@@ -125,14 +125,13 @@ export function useLayoutStyles( blockAttributes = {}, blockName, selector ) {
125125 const fullLayoutType = getLayoutType ( usedLayout ?. type || 'default' ) ;
126126 const [ blockGapSupport ] = useSettings ( 'spacing.blockGap' ) ;
127127 const hasBlockGapSupport = blockGapSupport !== null ;
128- const css = fullLayoutType ?. getLayoutStyle ?. ( {
128+ return fullLayoutType ?. getLayoutStyle ?. ( {
129129 blockName,
130130 selector,
131131 layout,
132132 style,
133133 hasBlockGapSupport,
134134 } ) ;
135- return css ;
136135}
137136
138137function LayoutPanelPure ( {
@@ -144,8 +143,6 @@ function LayoutPanelPure( {
144143 const settings = useBlockSettings ( blockName ) ;
145144 // Block settings come from theme.json under settings.[blockName].
146145 const { layout : layoutSettings } = settings ;
147- // Layout comes from block attributes.
148- const [ defaultThemeLayout ] = useSettings ( 'layout' ) ;
149146 const { themeSupportsLayout } = useSelect ( ( select ) => {
150147 const { getSettings } = select ( blockEditorStore ) ;
151148 return {
@@ -180,11 +177,9 @@ function LayoutPanelPure( {
180177 }
181178
182179 // Only show the inherit toggle if it's supported,
183- // a default theme layout is set (e.g. one that provides `contentSize` and/or `wideSize` values),
184180 // and either the default / flow or the constrained layout type is in use, as the toggle switches from one to the other.
185181 const showInheritToggle = ! ! (
186182 allowInheriting &&
187- ! ! defaultThemeLayout &&
188183 ( ! layout ?. type ||
189184 layout ?. type === 'default' ||
190185 layout ?. type === 'constrained' ||
0 commit comments