Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rename var
  • Loading branch information
tellthemachines committed Feb 27, 2024
commit d8130bd549f525a31100f7b0c7441f2028f99f5d
6 changes: 3 additions & 3 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) {
}

// Orientation is only used for flex layouts so its default is horizontal.
$parent_orientation = isset( $block['parentLayout']['orientation'] ) ? $block['parentLayout']['orientation'] : 'horizontal';
$vertical_parent_layout = in_array( $parent_layout_type, array( 'constrained', 'default' ), true ) || ( 'flex' === $parent_layout_type && 'vertical' === $parent_orientation );
$parent_orientation = isset( $block['parentLayout']['orientation'] ) ? $block['parentLayout']['orientation'] : 'horizontal';
$has_vertical_parent_layout = in_array( $parent_layout_type, array( 'constrained', 'default' ), true ) || ( 'flex' === $parent_layout_type && 'vertical' === $parent_orientation );

// Support for legacy flexSize value.
if ( 'fixed' === $self_stretch && isset( $child_layout['flexSize'] ) ) {
Expand All @@ -596,7 +596,7 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) {
$child_layout_declarations['flex-grow'] = '1';
}

if ( $vertical_parent_layout ) {
if ( $has_vertical_parent_layout ) {
// Width styles.
if ( 'fixed' === $self_align && $width ) {
$child_layout_declarations['max-width'] = $width;
Expand Down