Skip to content

Commit 7cd02ef

Browse files
Fix global styles and default control display for min height and width supports
1 parent 0d5d642 commit 7cd02ef

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

packages/block-editor/src/components/global-styles/dimensions-panel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ const DEFAULT_CONTROLS = {
212212
margin: true,
213213
blockGap: true,
214214
height: true,
215-
minHeight: false,
216-
minWidth: false,
215+
minHeight: true,
216+
minWidth: true,
217217
width: true,
218218
aspectRatio: true,
219219
childLayout: true,

packages/block-editor/src/hooks/dimensions.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ export function DimensionsPanel( { clientId, name, setAttributes, settings } ) {
102102
'__experimentalDefaultControls',
103103
] );
104104
const defaultControls = {
105+
// In the block inspector, minHeight and minWidth should not
106+
// be shown by default unless the block explicitly opts in.
107+
minHeight: false,
108+
minWidth: false,
105109
...defaultDimensionsControls,
106110
...defaultSpacingControls,
107111
};

0 commit comments

Comments
 (0)