Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#17564 closed enhancement (fixed)

Responsive Gallery Shortcode

Reported by: mfields's profile mfields Owned by: iandstewart's profile iandstewart
Milestone: 3.2 Priority: normal
Severity: normal Version: 3.2
Component: Themes Keywords: has-patch dev-feedback
Focuses: Cc:


The gallery shortcode does not respond when browser is re-sized. I'm not sure if this is part of the plan for Twenty Eleven, but I've put together a patch with a suggested solution. Not the most graceful code, but I had a hard time coming up with specific enough selectors to override the code block created by the gallery shortcode.

Attachments (3)

17564.responsive-gallery-shortcode.diff (1.7 KB) - added by mfields 13 years ago.
Allow gallery shortcode to respond up to 9 columns.
17564.responsive-gallery-shortcode-2.diff (1.1 KB) - added by mfields 13 years ago.
Allow gallery shortcode to respond up to 4 columns.
17564.responsive-gallery-shortcode-3.diff (1.6 KB) - added by iandstewart 13 years ago.

Download all attachments as: .zip

Change History (15)

#1 @dd32
13 years ago

  • Component changed from Themes to Administration
  • Type changed from enhancement to feature request

13 years ago

Allow gallery shortcode to respond up to 9 columns.

#2 @dd32
13 years ago

  • Type changed from feature request to enhancement

sorry about that, Didn't mean to do that..

#3 @dd32
13 years ago

  • Component changed from Administration to Themes

#4 @iandstewart
13 years ago

  • Cc ian@… added

I think supporting up to 4 columns, like Twenty Ten would be OK. Going beyond that seems a bit much -- though it'd be great for a fluid child theme of Twenty Eleven.

13 years ago

Allow gallery shortcode to respond up to 4 columns.

#5 @iandstewart
13 years ago

mfields, I've uploaded a patch that strips away the !importants. It's working for me. Let me know if this is working for you as well in your tests.

#6 @iandstewart
13 years ago

  • Keywords reporter-feedback added

#7 @mfields
13 years ago

  • Keywords reporter-feedback removed

Just tested 17564.responsive-gallery-shortcode-3.diff on latest FF Opera, Safari and Chrome on Mac. Works beautifully across the board! Now to see how you did it ...

#8 @mfields
13 years ago

Just looked through 17564.responsive-gallery-shortcode-3.diff. It seems to introduce code unrelated to this ticket (widgets section). Would this code be better moved to it's own patch?

#9 @iandstewart
13 years ago

Sorry about that. I went on a bit of an unimportant-ing spree.

#10 @iandstewart
13 years ago

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

In [18134]:

Twenty Eleven: style 4-column galleries -- Props mfields -- and remove unneeded !important rules; Fixes #17564

#11 @ocean90
13 years ago

  • Milestone changed from Awaiting Review to 3.2

#12 @nhuja
13 years ago

Is this all set? I was making a responsive design and while the images in gallery scales up/down, the thumbnails kind of extend as I have 1200px as my main width. So the 150px images extends to probably 250. Anyway, I wanted to post an idea of making gallery responsive. Trash the columns functionality and then just make the thumbnails appear according to the width available. So, it can be 1,2,3,4 or more depending upon the width it has. The gallery HTML is so annoying and the css as well. It might decrease the gallery code a bit if we trash the columns options.

Note: See TracTickets for help on using tickets.