Editor: Negative margins for alignfull children of blocks with custom padding.

Fixes a condition that was preventing align full blocks to extend full width when their parent block has custom padding.

Props richtabor, isabel_brison, ramonopoly.
Fixes #61313.

Built from https://develop.svn.wordpress.org/trunk@58243


git-svn-id: http://core.svn.wordpress.org/trunk@57706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
isabel_brison 2024-05-30 04:10:09 +00:00
parent 1b218aaa39
commit f7515f439f
2 changed files with 26 additions and 25 deletions

View File

@ -224,6 +224,7 @@ function wp_register_layout_support( $block_type ) {
* @since 6.1.0 Added `$block_spacing` param, use style engine to enqueue styles.
* @since 6.3.0 Added grid layout type.
* @since 6.6.0 Removed duplicated selector from layout styles.
* Enabled negative margins for alignfull children of blocks with custom padding.
* @access private
*
* @param string $selector CSS selector.
@ -307,6 +308,7 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
'declarations' => array( 'max-width' => 'none' ),
)
);
}
if ( isset( $block_spacing ) ) {
$block_spacing_values = wp_style_engine_get_styles(
@ -334,7 +336,6 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
);
}
}
}
if ( 'left' === $justify_content ) {
$layout_styles[] = array(

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.6-alpha-58242';
$wp_version = '6.6-alpha-58243';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.