Opened 2 years ago

Closed 2 years ago

Last modified 20 months ago

#17564 closed enhancement (fixed)

Responsive Gallery Shortcode

Reported by: mfields Owned by: iandstewart
Priority: normal Milestone: 3.2
Component: Themes Version: 3.2
Severity: normal Keywords: has-patch dev-feedback
Cc: michael@…, ian@…

Description

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 2 years ago.
Allow gallery shortcode to respond up to 9 columns.
17564.responsive-gallery-shortcode-2.diff (1.1 KB) - added by mfields 2 years ago.
Allow gallery shortcode to respond up to 4 columns.
17564.responsive-gallery-shortcode-3.diff (1.6 KB) - added by iandstewart 2 years ago.

Download all attachments as: .zip

Change History (15)

comment:1   dd322 years ago

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

mfields2 years ago

Allow gallery shortcode to respond up to 9 columns.

comment:2   dd322 years ago

  • Type changed from feature request to enhancement

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

comment:3   dd322 years ago

  • Component changed from Administration to Themes
  • 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.

mfields2 years ago

Allow gallery shortcode to respond up to 4 columns.

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.

  • Keywords reporter-feedback added
  • 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 ...

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?

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

  • 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

  • Milestone changed from Awaiting Review to 3.2

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.