[wp-trac] [WordPress Trac] #61138: Twenty Nineteen: Latest Posts block top/bottom spacing is not same on editor side and front-end side when we change its background. (was: Twenty Nineteen: Latest post block text color and top/bottom spacing are not same on editor side and front-end side when we change its background.)
WordPress Trac
noreply at wordpress.org
Tue Aug 27 18:37:28 UTC 2024
#61138: Twenty Nineteen: Latest Posts block top/bottom spacing is not same on
editor side and front-end side when we change its background.
---------------------------------------+-----------------------------
Reporter: viralsampat | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Bundled Theme | Version: 6.5
Severity: normal | Resolution:
Keywords: needs-refresh 2nd-opinion | Focuses: ui, css
---------------------------------------+-----------------------------
Changes (by sabernhardt):
* keywords: needs-refresh => needs-refresh 2nd-opinion
* type: defect (bug) => enhancement
Comment:
Let's keep the discussion about automatic contrast text colors with
background on #49931.
For the padding, WordPress 6.6 fixed the discrepancy between the editor
and front. The lower `:root :where()` specificity stopped overriding the
theme's setting of zero padding for the Latest Posts block in the editor.
On the front, the theme's specificity already was higher.
Editor:
{{{
/* Twenty Nineteen style-editor.css */
.wp-block-latest-posts {
padding: 0;
}
/* block-library/style.css */
:root :where(ul.has-background, ol.has-background) {
padding: 1.25em 2.375em;
}
/* block-library/editor.css */
:root :where(.wp-block-latest-posts) {
padding-left: 2.5em;
}
:root :where(.wp-block-latest-posts.is-grid), :root :where(.wp-block-
latest-posts__list) {
padding-left: 0;
}
}}}
Front:
{{{
/* Twenty Nineteen style.css */
.entry .entry-content .wp-block-latest-posts {
padding: 0;
}
/* block-library/style.css */
:root :where(.wp-block-latest-posts.wp-block-latest-posts__list) {
padding-left: 0;
}
:root :where(ul.has-background, ol.has-background) {
padding: 1.25em 2.375em;
}
}}}
The block might look better with a small amount of padding on all sides
whenever it has a background color, but that would be an enhancement. *If*
this is a good idea, I would suggest `0.5rem` on the front and `11px`
(`0.5 * $font__size_base`) in the editor.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61138#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list