[wp-trac] [WordPress Trac] #26642: [caption] is 10px too wide
WordPress Trac
noreply at wordpress.org
Mon Dec 16 11:41:05 UTC 2013
#26642: [caption] is 10px too wide
--------------------------+-----------------------------
Reporter: Looimaster | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.8
Severity: normal | Keywords:
--------------------------+-----------------------------
In /wp-includes/media.php in `img_caption_shortcode()` there is a note
saying `By default, the caption is 10 pixels greater than the width of the
image, to prevent post content from running up against a floated image.`
but this makes the caption text misaligned (too long) 10px in all the
possible cases:
- image floating left
- image floating right
- image centered
- image with `alignnone`
Caption text is longer than the image. Not exactly below the image.
Furthermore, if an image without caption (for example 150px wide) is
placed below/above the image with caption (150px converted to 160px) and
both are left aligned then it forms a misaligned grid (all images with
captions push the text 10px to the right).
When I remove this 10px increment, everything looks exactly like expected.
Post content doesn't run onto the image or caption in any case and I
tested them all. I'm wondering if this 10px increment should be there?
What does it do? Maybe that's a bug?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26642>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list