From 52bfcc7ee85e42cfe192a6957f5e4a595d15147f Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Tue, 21 Mar 2023 14:42:49 +1100 Subject: [PATCH] Fix responsivity of min size --- lib/block-supports/layout.php | 2 +- packages/block-editor/src/layouts/grid.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/block-supports/layout.php b/lib/block-supports/layout.php index f7866b9c7d5b7a..cc43254f30565a 100644 --- a/lib/block-supports/layout.php +++ b/lib/block-supports/layout.php @@ -285,7 +285,7 @@ function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support $layout_styles[] = array( 'selector' => $selector, - 'declarations' => array( 'grid-template-columns' => 'repeat(auto-fill, minmax(' . $minimum_column_width . ', 1fr))' ), + 'declarations' => array( 'grid-template-columns' => 'repeat(auto-fill, minmax(min(' . $minimum_column_width . ', 100%), 1fr))' ), ); if ( $has_block_gap_support && isset( $gap_value ) ) { diff --git a/packages/block-editor/src/layouts/grid.js b/packages/block-editor/src/layouts/grid.js index e332aabc574ae9..33c86628808f08 100644 --- a/packages/block-editor/src/layouts/grid.js +++ b/packages/block-editor/src/layouts/grid.js @@ -68,7 +68,7 @@ export default { if ( minimumColumnWidth ) { rules.push( - `grid-template-columns: repeat(auto-fill, minmax(${ minimumColumnWidth }, 1fr))` + `grid-template-columns: repeat(auto-fill, minmax(min(${ minimumColumnWidth }, 100%), 1fr))` ); }