#27502 closed enhancement (fixed)
Twenty Thirteen and Fourteen: Add support for HTML5 gallery and caption
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | ui | Cc: |
Description
HTML5 gallery (r27302) and caption (r27668) markup were introduced in 3.9.
Let's update the two default themes that have added support for some HTML5 features with support for it.
Since both Twenty Thirteen and Twenty Fourteen have custom styles for galleries, adding support to them is rather trivial. Captions need a bit more CSS love to keep them visually consistent.
Backwards compatibility in general should not be a problem, since both themes we developed against the pre-HTML5 output.
Attachments (3)
Change History (10)
#2
follow-up:
↓ 3
@
11 years ago
- Focuses ui added
Isn't it too late for 3.9? Pencils down last Friday, I think.
#3
in reply to:
↑ 2
;
follow-up:
↓ 4
@
11 years ago
Replying to lancewillett:
Isn't it too late for 3.9? Pencils down last Friday, I think.
I'm fine with new-feature-support being added to default themes whenever. However, would adding this cause problems with existing custom styles, child themes, etc? I'd love to do this, but it's not a small markup shift.
#4
in reply to:
↑ 3
@
11 years ago
Replying to nacin:
However, would adding this cause problems with existing custom styles, child themes, etc?
Possibly. Captions more likely than galleries. All bets are off when they used element selectors.
This ticket was mentioned in IRC in #wordpress-dev by nacin. View the logs.
11 years ago
#6
@
11 years ago
- Owner set to lancewillett
- Resolution set to fixed
- Status changed from new to closed
In 27763:
The only (front-end) CSS change necessary for galleries is an added bottom margin for gallery captions in Twenty Thirteen. It used to rely on the
p
element to add that.For captions we need some more work since we have to make up for the lost 10px in width. It can mostly be achieved with overriding the selector that defines the margins on aligned caption images.
While working on it I discovered and fixed a visual bug in both themes, where images within right aligned captions were still left aligned within the caption. I added styles to either add a padding left or float it right, so the margin to the text is corrected. See before and after: https://cloudup.com/cBVsdJYVprT
For editor styles I had to reset the padding we added for HTML5 captions both times. So removing caption styles for HTML5 entirely, as azaozz brought up in #26642, might not be the worst idea.