From 4074881eccc2a2ce9447946e0ffd8b445c20f743 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Tue, 25 Oct 2022 17:10:39 +1100 Subject: [PATCH] Off switch for layout classes in inner wrapper --- packages/block-editor/src/components/inner-blocks/index.js | 4 ++-- packages/block-library/src/group/edit.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/inner-blocks/index.js b/packages/block-editor/src/components/inner-blocks/index.js index 957e9fa60a3f4..057cded085232 100644 --- a/packages/block-editor/src/components/inner-blocks/index.js +++ b/packages/block-editor/src/components/inner-blocks/index.js @@ -150,7 +150,7 @@ const ForwardedInnerBlocks = forwardRef( ( props, ref ) => { * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md */ export function useInnerBlocksProps( props = {}, options = {} ) { - const { __experimentalLayout } = options; + const { __unstableNoLayoutClassNames } = options; const { clientId, __unstableLayoutClassNames: layoutClassNames = '' } = useBlockEditContext(); const isSmallScreen = useViewportMatch( 'medium', '<' ); @@ -209,9 +209,9 @@ export function useInnerBlocksProps( props = {}, options = {} ) { className: classnames( props.className, 'block-editor-block-list__layout', + __unstableNoLayoutClassNames ? '' : layoutClassNames, { 'has-overlay': hasOverlay, - [ layoutClassNames ]: __experimentalLayout, } ), children: clientId ? ( diff --git a/packages/block-library/src/group/edit.js b/packages/block-library/src/group/edit.js index f4b69bcbf68fe..7d527819927a9 100644 --- a/packages/block-library/src/group/edit.js +++ b/packages/block-library/src/group/edit.js @@ -74,6 +74,7 @@ function GroupEdit( { ? undefined : InnerBlocks.ButtonBlockAppender, __experimentalLayout: layoutSupportEnabled ? usedLayout : undefined, + __unstableNoLayoutClassNames: ! layoutSupportEnabled, } );