diff --git a/packages/block-library/src/spacer/edit.js b/packages/block-library/src/spacer/edit.js index 11133732042d3..d384f7997ec38 100644 --- a/packages/block-library/src/spacer/edit.js +++ b/packages/block-library/src/spacer/edit.js @@ -93,9 +93,14 @@ const SpacerEdit = ( { return editorSettings?.disableCustomSpacingSizes; } ); const { orientation } = context; - const { orientation: parentOrientation, type } = parentLayout || {}; + const { + orientation: parentOrientation, + type, + default: { type: defaultType } = {}, + } = parentLayout || {}; // Check if the spacer is inside a flex container. - const isFlexLayout = type === 'flex'; + const isFlexLayout = + type === 'flex' || ( ! type && defaultType === 'flex' ); // If the spacer is inside a flex container, it should either inherit the orientation // of the parent or use the flex default orientation. const inheritedOrientation =