Skip to content

Commit fd37383

Browse files
tellthemachinesfabiankaegy
authored andcommitted
Fix responsive column span logic on the front end. (#60976)
Co-authored-by: tellthemachines <[email protected]> Co-authored-by: fabiankaegy <[email protected]>
1 parent 467f5ba commit fd37383

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/block-supports/layout.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,8 +612,8 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) {
612612
'declarations' => $child_layout_declarations,
613613
);
614614

615-
$minimum_column_width = isset( $block['attrs']['style']['layout']['minimumColumnWidth'] ) ? $block['attrs']['style']['layout']['minimumColumnWidth'] : null;
616-
$column_count = isset( $block['attrs']['style']['layout']['columnCount'] ) ? $block['attrs']['style']['layout']['columnCount'] : null;
615+
$minimum_column_width = isset( $block['parentLayout']['minimumColumnWidth'] ) ? $block['parentLayout']['minimumColumnWidth'] : null;
616+
$column_count = isset( $block['parentLayout']['columnCount'] ) ? $block['parentLayout']['columnCount'] : null;
617617

618618
/*
619619
* If columnSpan or columnStart is set, and the parent grid is responsive, i.e. if it has a minimumColumnWidth set,

0 commit comments

Comments
 (0)