Editor: fix root padding for alignwide blocks.
Updates the root padding CSS selectors so wide width container blocks with constrained layout don’t receive padding. Props isabel_brison, mukesh27, aaronrobertshaw. Fixes #61587. Built from https://develop.svn.wordpress.org/trunk@58685 git-svn-id: http://core.svn.wordpress.org/trunk@58087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
61c8c315a9
commit
eaada5a23c
|
@ -2962,10 +2962,10 @@ class WP_Theme_JSON {
|
||||||
$css .= '.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }';
|
$css .= '.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }';
|
||||||
// Alignfull children of the container with left and right padding have negative margins so they can still be full width.
|
// Alignfull children of the container with left and right padding have negative margins so they can still be full width.
|
||||||
$css .= '.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }';
|
$css .= '.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }';
|
||||||
// Nested children of the container with left and right padding that are not wide or full aligned do not get padding, unless they are direct children of an alignfull flow container.
|
// Nested children of the container with left and right padding that are not full aligned do not get padding, unless they are direct children of an alignfull flow container.
|
||||||
$css .= '.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull, .alignwide)) { padding-right: 0; padding-left: 0; }';
|
$css .= '.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }';
|
||||||
// Alignfull direct children of the containers that are targeted by the rule above do not need negative margins.
|
// Alignfull direct children of the containers that are targeted by the rule above do not need negative margins.
|
||||||
$css .= '.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull, .alignwide)) > .alignfull { margin-left: 0; margin-right: 0; }';
|
$css .= '.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0; }';
|
||||||
}
|
}
|
||||||
|
|
||||||
$css .= '.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }';
|
$css .= '.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }';
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.7-alpha-58684';
|
$wp_version = '6.7-alpha-58685';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue