mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Editor: tweak root padding styles.
Removes root padding from children of flex and grid layout blocks when root padding aware alignments are set. Props andrewserong, ramonopoly. Fixes #59295. git-svn-id: https://develop.svn.wordpress.org/trunk@56546 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2493,7 +2493,7 @@ class WP_Theme_JSON {
|
||||
// The above rule is negated for alignfull children of nested containers.
|
||||
$css .= '.has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; }';
|
||||
// Some of the children of alignfull blocks without content width should also get padding: text blocks and non-alignfull container blocks.
|
||||
$css .= '.has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }';
|
||||
$css .= '.has-global-padding > .alignfull:where(:not(.has-global-padding):not(.is-layout-flex):not(.is-layout-grid)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }';
|
||||
// The above rule also has to be negated for blocks inside nested `.has-global-padding` blocks.
|
||||
$css .= '.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0; }';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user