#21475 closed defect (bug) (fixed)

Twenty Twelve: Better Gallery Columns Support

Reported by: philiparthurmoore Owned by: lancewillett
Priority: normal Milestone: 3.5
Component: Bundled Theme Version:
Severity: normal Keywords: has-patch
Cc: pdclark

Description

By default WordPress allows users to set anywhere from 1 to 9 columns for their galleries. At present the margins between those images isn't consistent (see attachment). The following shortcode test was used in order to create the screenshot:

[gallery columns="1" size="large"]
[gallery columns="2" size="large"]
[gallery columns="3" size="large"]
[gallery columns="4" size="large"]
[gallery columns="5" size="large"]
[gallery columns="6" size="large"]
[gallery columns="7" size="large"]
[gallery columns="8" size="large"]
[gallery columns="9" size="large"]

Let's create better displays for those columns.

Attachments (3)

21475-padding-in-pixels.jpg (663.1 KB) - added by pdclark 10 months ago.
Current padding - value in pixels
21475-padding-in-percent.jpg (635.7 KB) - added by pdclark 10 months ago.
Recommended padding - in percent
21475.patch (597 bytes) - added by pdclark 10 months ago.
Set image width and padding as percentage in galleries

Download all attachments as: .zip

Change History (9)

  • Owner set to pdclark
  • Status changed from new to reviewing

Current padding - value in pixels

Recommended padding - in percent

Set image width and padding as percentage in galleries

  • Cc pdclark added
  • Keywords has-patch added
  • Owner changed from pdclark to philiparthurmoore

I added a patch that sets the width by percentage. While in there, I noticed that the image padding set in pixels caused the white space between the image and border to be disproportionately large for small images (many columns). I've attached screenshots, padding-in-pixels and padding-in-percent to show the difference. Patch sets both width and padding as percent.

  • Milestone changed from Awaiting Review to 3.5
  • Owner changed from philiparthurmoore to lancewillett
  • Status changed from reviewing to accepted
  • Resolution set to fixed
  • Status changed from accepted to closed

In [21478]:

Twenty Twelve: better gallery columns support, and CSS cleanup. Closes #21475, props philiparthurmoore and pdclark.

Note: See TracTickets for help on using tickets.