Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#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: Focuses:

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 14 years ago.
Current padding - value in pixels
21475-padding-in-percent.jpg​ (635.7 KB ) - added by pdclark 14 years ago.
Recommended padding - in percent
21475.patch​ (597 bytes ) - added by pdclark 14 years ago.
Set image width and padding as percentage in galleries

Download all attachments as: .zip

Change History (9)

#2 @pdclark
14 years ago

  • Owner set to pdclark
  • Status new → reviewing

@pdclark
14 years ago

Current padding - value in pixels

@pdclark
14 years ago

Recommended padding - in percent

@pdclark
14 years ago

Set image width and padding as percentage in galleries

#3 @pdclark
14 years ago

  • 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.

#4 @lancewillett
14 years ago

  • Milestone Awaiting Review → 3.5

#5 @lancewillett
14 years ago

  • Owner changed from philiparthurmoore to lancewillett
  • Status reviewing → accepted

#6 @lancewillett
14 years ago

  • Resolution → fixed
  • Status accepted → 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.