#15103 closed defect (bug) (fixed)
Twenty ten 2 column gallery behaves as a three column gallery
Reported by: | lessbloat | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Gallery | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
To reproduce:
1) Activate twenty ten theme in either WP.org, or WP.com
2) Add a new post
3) Insert a 2 column gallery (tested with 4 images in gallery) into your post
4) Publish and preview your post.
Expected: While there ARE only two columns of images (as expected), the image containers themselves (div.gallery-item) need to be set to { width: 50% }
Actual: they are currently set to { width: 33% }, causing images to overlap.
Attachments (3)
Change History (16)
#3
@
14 years ago
- Keywords has-patch added
The gallery_style filter should die a slow and painful death. Here's one potential implementation.
We may also wish to add a gallery_div filter but I'm not sure which parameters to pass beyond what is already used to generate the ID and classes.
#6
follow-up:
↓ 9
@
14 years ago
- Keywords commit added
Running with this. Here's what I'm doing:
- gallery_style is going to be be broken down as seen in the patch, with a use_default_gallery_style (true/false).
- the columns class will be added to the div.
- gallery_style will still wrap the entire output, begrudgingly.
- Twenty Ten will then need to leverage use_default_gallery_style. Additionally, we'll need new CSS to leverage the columns class. Need help on that last bit -- is the patch by Ian still good?
#8
@
14 years ago
(In [16866]) Deprecate twentyten_remove_gallery_css in favor of the use_default_gallery_style filter. see #15103.
Not bothering with _deprecated_function() there by design. Also not bothering making this entirely back compat: The chances that someone is deliberately using the default gallery styles in a child theme by removing this filter, is pretty much nil.
Remaining: columns styling.
#9
in reply to:
↑ 6
@
14 years ago
Need help on that last bit -- is the patch by Ian still good?
Adding refreshed patch for just CSS rules.
Attaching a patch that adds additional classes to galleries and styles in Twenty Ten to take advantage of this. The extra classes would be useful for any theme that wants specific styles for galleries--especially ones with multiple layouts.