Editor: Add missing controls to flex layouts in `wp_get_layout_style()`.
Adds missing controls to flex layouts in `wp_get_layout_style()` for justify-content and vertical alignment options. References: * [https://github.com/WordPress/gutenberg/pull/47134 Gutenberg PR 47134]. Follow-up to [54274]. Props isabel_brison, andrewserong, jameskoster, joen, onemaggie , ndiego. Fixes #57602. Built from https://develop.svn.wordpress.org/trunk@55201 git-svn-id: http://core.svn.wordpress.org/trunk@54734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fbfd2b4372
commit
a35991eb44
|
@ -207,7 +207,11 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
|
|||
);
|
||||
|
||||
if ( 'horizontal' === $layout_orientation ) {
|
||||
$justify_content_options += array( 'space-between' => 'space-between' );
|
||||
$justify_content_options += array( 'space-between' => 'space-between' );
|
||||
$vertical_alignment_options += array( 'stretch' => 'stretch' );
|
||||
} else {
|
||||
$justify_content_options += array( 'stretch' => 'stretch' );
|
||||
$vertical_alignment_options += array( 'space-between' => 'space-between' );
|
||||
}
|
||||
|
||||
if ( ! empty( $layout['flexWrap'] ) && 'nowrap' === $layout['flexWrap'] ) {
|
||||
|
@ -276,6 +280,12 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
|
|||
'declarations' => array( 'align-items' => 'flex-start' ),
|
||||
);
|
||||
}
|
||||
if ( ! empty( $layout['verticalAlignment'] ) && array_key_exists( $layout['verticalAlignment'], $vertical_alignment_options ) ) {
|
||||
$layout_styles[] = array(
|
||||
'selector' => $selector,
|
||||
'declarations' => array( 'justify-content' => $vertical_alignment_options[ $layout['verticalAlignment'] ] ),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.2-alpha-55200';
|
||||
$wp_version = '6.2-alpha-55201';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue