Page MenuHomePhabricator

Uncentered caption text in gallery image is page-left (rather than image-frame-left) justified
Closed, InvalidPublic

Description

Author: rocketman1937

Description:
Problem encountered editing Wikipedia December 12, 2012.

SETUP:

  1. Given a titled gallery with a captioned image (single image file in my problem case)
  1. The gallery is centered by bracketing with <center> and </center>

This results in the captioning text to also be centered (this is not unexpected).

  1. Attempt to uncenter the captioning by bracketing the caption text with </center> and <center>

UNEXPECTED RESULT:
This results in the caption text appearing fully left justified using the page boundary rather than the gallery image box outer boundary.

WORK AROUND (for this specific single image case):

A.) Close the gallery with </gallery>after the gallery image title

B.) Display the image file as a "thumb" of the appropriate width using the "centered" option. (This will not center the text, but note that the text may be centered explicitly by bracketing with <center> </center>)

ALTERNATE WORK-AROUND (Also only for single image case):

After closing the gallery Display the image file as a "wide image", these are automatically centered and default to left justified text.

ADDITIONAL TESTS NOT PERFORMED:

No attempt was made to check the case of multiple images with uncentered text, this should be part of the post-fix testing.


Version: 1.21.x
Severity: minor
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=43186

Details

Reference
bz43035

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 1:09 AM
bzimport added a project: MediaWiki-Interface.
bzimport set Reference to bz43035.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Dec 12 2012, 8:17 PM

Thanks for taking the time to report this!
If possible, please provide an example web address (URL) - that makes it easier to test/reproduce.

rocketman1937 wrote:

See https://en.wikipedia.org/wiki/User:Leonard_G./sandbox

Section "Demo Two" - this illustrates the problem

Note that I am proposing the addition of <left>...<left> and <right>...<right> which would work similar to <center>...</center>

Leonard

rocketman1937 wrote:

P.S. Additional whitespace is not my addition - it is an addtional error effect.

Two work-arounds are shown, by using "thumb" and by using "wide image"

rocketman1937 wrote:

Question: How do I file a feature request?

  • Leonard

(In reply to comment #4)

Question: How do I file a feature request?

See http://www.mediawiki.org/wiki/Bugzilla - set severity to "enhancement".

matmarex closed this task as Invalid.Feb 21 2018, 8:56 PM
matmarex added a subscriber: matmarex.

Marking as invalid since this is impossible with how HTML works. You can't "un-center" content that is inside a <center> tag. For example, this can't work (this is adapted from the example in the description, just simplified):

<center>
<gallery caption="Centered gallery">
File:Example.jpg|</center>Left-aligned caption<center>
</gallery>
</center>