WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#24238 closed defect (bug) (fixed)

Twenty Thirteen doesn't pad `alignnone` images that are inserted into a post on the same line

Reported by: ryan Owned by: lancewillett
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description (last modified by ryan)

When multiple images are inserted into a post at the same time they are often inserted all on the same line. 2013 doesn't pad these images. Screenshot attached.

Here's some example content. This is created by inserting multiple images in one go with the media modal.

<a href="http://ryan.boren.me/2013/05/01/limestone-wall/img_2964/" rel="attachment wp-att-5382"><img class="alignnone size-full wp-image-5382" alt="Limestone Wall" src="http://ryan.files.wordpress.com/2013/05/img_2964.jpg" width="640" height="480" /></a> <a href="http://ryan.boren.me/2013/05/01/limestone-wall/img_2965/" rel="attachment wp-att-5383"><img class="alignnone size-full wp-image-5383" alt="Limestone Wall" src="http://ryan.files.wordpress.com/2013/05/img_2965.jpg" width="640" height="480" /></a>

Attachments (2)

Screen Shot 2013-05-01 at 11.59.31 AM.png (1.2 MB) - added by ryan 2 years ago.
24238.diff (858 bytes) - added by lancewillett 2 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 @ryan2 years ago

  • Component changed from General to Bundled Theme

comment:2 @ryan2 years ago

  • Description modified (diff)

@lancewillett2 years ago

comment:3 @lancewillett2 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.6
  • Summary changed from Twenty Thirteen doesn't pad images that are inserted into a post on the same line to Twenty Thirteen doesn't pad `alignnone` images that are inserted into a post on the same line

I think this relates to alignnone styles only, since left, right, and center all introduce a bit of space.

Patch attached.

comment:4 @lancewillett2 years ago

  • Owner set to lancewillett
  • Resolution set to fixed
  • Status changed from new to closed

In 24152:

Twenty Thirteen: account for alignnone images that are inserted into a post on the same line. Give 'em a bit of space. Closes #24238.

comment:5 follow-up: @obenland2 years ago

I was under the impression that images that are not aligned are meant to be inline with the surrounding text and a margin would be unwanted.

comment:6 in reply to: ↑ 5 @lancewillett2 years ago

Replying to obenland:

I was under the impression that images that are not aligned are meant to be inline with the surrounding text and a margin would be unwanted.

"Align none" means don't float left or right or center. In other default themes the entry content container has a much higher line-height, which takes care of adding a bit of room in between inline items. Twenty Thirteen doesn't so the images needs some breathing room anyway.

Can you think of a use case where this would break something? I tested with Image Test from Theme Unit Test data and it actually improved things visually for the "alignnone" cases. :)

Note: See TracTickets for help on using tickets.