WordPress.org

Make WordPress Core

Opened 4 weeks ago

Closed 22 hours ago

#42604 closed defect (bug) (fixed)

Problem: alignment of image with caption

Reported by: slilley Owned by: obenland
Milestone: 4.9.2 Priority: normal
Severity: normal Version: 4.9
Component: Bundled Theme Keywords:
Focuses: Cc:

Description

Using Twenty-Ten them, if you put an image in a post, give it a caption and align it "none", the image should remain default-left aligned, with a small frame, and no text wrap.

After WP 4.9, that same image will now appear centered in the post, with a frame (and caption) that extends the full width of the post.

Attachments (3)

pre_4_9.jpg (160.2 KB) - added by slilley 4 weeks ago.
display, pre-WP4.9
post_4_9.jpg (164.7 KB) - added by slilley 4 weeks ago.
display within WP4.9
shortcaption.jpg (156.1 KB) - added by slilley 2 weeks ago.

Download all attachments as: .zip

Change History (10)

@slilley
4 weeks ago

display, pre-WP4.9

@slilley
4 weeks ago

display within WP4.9

#1 follow-up: @hardeepasrani
4 weeks ago

  • Component changed from General to Themes

I think I found the issue in the theme, but I'm just wondering if the Twenty Ten theme is still being maintained?

#2 @hardeepasrani
4 weeks ago

  • Component changed from Themes to Bundled Theme

#3 in reply to: ↑ 1 @slilley
4 weeks ago

Replying to hardeepasrani:

I think I found the issue in the theme, but I'm just wondering if the Twenty Ten theme is still being maintained?

Yes, Twenty Ten theme has been updated.

#4 follow-up: @Clorith
2 weeks ago

  • Component changed from Bundled Theme to Media
  • Milestone changed from Awaiting Review to 4.9.2

Introduced in r41724

The use of max-width on the container lets the wp-caption-text cause it to overflow for some reason, providing a max-width that mimics the parents max width might be an idea (so far only observed on themes that do not have HTML5 support, so it might be something there)

#5 in reply to: ↑ 4 @slilley
2 weeks ago

Even if the caption is short (i.e. narrower than the image), the shaded frame still goes wide.

Replying to Clorith:

Introduced in r41724

The use of max-width on the container lets the wp-caption-text cause it to overflow for some reason, providing a max-width that mimics the parents max width might be an idea (so far only observed on themes that do not have HTML5 support, so it might be something there)

@slilley
2 weeks ago

#6 @obenland
26 hours ago

  • Component changed from Media to Bundled Theme
  • Owner set to obenland
  • Status changed from new to accepted

#7 @obenland
22 hours ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 42386:

Twenty Ten: Use global img contraint for captions

Fixes an incompatibility with the way caption width is set since 4.9, where the caption element would cover the whole content width.

Props slilley, Clorith, hardeepasrani.
Fixes #42604.

Note: See TracTickets for help on using tickets.