Skip to content

Commit 52bfcc7

Browse files
Fix responsivity of min size
1 parent 7bb10f9 commit 52bfcc7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/block-supports/layout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support
285285

286286
$layout_styles[] = array(
287287
'selector' => $selector,
288-
'declarations' => array( 'grid-template-columns' => 'repeat(auto-fill, minmax(' . $minimum_column_width . ', 1fr))' ),
288+
'declarations' => array( 'grid-template-columns' => 'repeat(auto-fill, minmax(min(' . $minimum_column_width . ', 100%), 1fr))' ),
289289
);
290290

291291
if ( $has_block_gap_support && isset( $gap_value ) ) {

packages/block-editor/src/layouts/grid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default {
6868

6969
if ( minimumColumnWidth ) {
7070
rules.push(
71-
`grid-template-columns: repeat(auto-fill, minmax(${ minimumColumnWidth }, 1fr))`
71+
`grid-template-columns: repeat(auto-fill, minmax(min(${ minimumColumnWidth }, 100%), 1fr))`
7272
);
7373
}
7474

0 commit comments

Comments
 (0)