[wp-trac] [WordPress Trac] #50376: Twenty Seventeen: Gallery captions are not at the bottom of images of some sizes (was: Gallery captions are not at the bottom of images of some sizes)
WordPress Trac
noreply at wordpress.org
Sun Jun 14 00:12:39 UTC 2020
#50376: Twenty Seventeen: Gallery captions are not at the bottom of images of some
sizes
---------------------------+------------------------------
Reporter: pevogam | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: css
---------------------------+------------------------------
Changes (by sabernhardt):
* keywords: => needs-patch
* focuses: => css
* component: General => Bundled Theme
Comment:
@pevogam Hi and thanks for the report!
It seems that the margin specified in the Twenty Seventeen blocks.css
stylesheet causes the problem when a gallery is placed inside another
block type (Group in this case).
{{{
[class^="wp-block-"]:not(.wp-block-gallery) figcaption {
font-style: italic;
margin-bottom: 1.5em;
text-align: left;
}
}}}
It might work to include the child combinator to the selector, though then
the caption would not be aligned left anymore.
`[class^="wp-block-"]:not(.wp-block-gallery) > figcaption`
So instead, I like the idea of specifically declaring that gallery block
captions have no bottom margin:
{{{
[class^="wp-block-"].wp-block-gallery figcaption {
margin-bottom: 0;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50376#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list