From 578200c370a59a27afb06f7e289ff76bf5c4cac7 Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Fri, 23 Aug 2024 07:34:39 +0800 Subject: [PATCH] Post editor: apply space below content using a pseudo-element instead of padding-bottom (#64639) Co-authored-by: talldan Co-authored-by: stokesman Co-authored-by: t-hamano Co-authored-by: carolinan Co-authored-by: PC888 --- packages/edit-post/src/components/layout/index.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js index 9266cbbb10a557..519b32691c6a49 100644 --- a/packages/edit-post/src/components/layout/index.js +++ b/packages/edit-post/src/components/layout/index.js @@ -74,7 +74,6 @@ function useEditorStyles() { hasThemeStyleSupport, editorSettings, isZoomedOutView, - hasMetaBoxes, renderingMode, postType, } = useSelect( ( select ) => { @@ -86,7 +85,6 @@ function useEditorStyles() { select( editPostStore ).isFeatureActive( 'themeStyles' ), editorSettings: select( editorStore ).getEditorSettings(), isZoomedOutView: __unstableGetEditorMode() === 'zoom-out', - hasMetaBoxes: select( editPostStore ).hasMetaBoxes(), renderingMode: getRenderingMode(), postType: _postType, }; @@ -132,16 +130,13 @@ function useEditorStyles() { // bottom, there needs to be room to scroll up. if ( ! isZoomedOutView && - ! hasMetaBoxes && renderingMode === 'post-only' && ! DESIGN_POST_TYPES.includes( postType ) ) { return [ ...baseStyles, { - // Should override global styles padding, so ensure 0-1-0 - // specificity. - css: ':root :where(body){padding-bottom: 40vh}', + css: ':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}', }, ]; }