Skip to content

Commit

Permalink
Post editor: apply space below content using a pseudo-element instead…
Browse files Browse the repository at this point in the history
… of padding-bottom (WordPress#64639)

Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: stokesman <presstoke@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>
Co-authored-by: PC888 <kracked888@git.wordpress.org>
  • Loading branch information
6 people authored and bph committed Aug 31, 2024
1 parent 0eb8f50 commit 578200c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/edit-post/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ function useEditorStyles() {
hasThemeStyleSupport,
editorSettings,
isZoomedOutView,
hasMetaBoxes,
renderingMode,
postType,
} = useSelect( ( select ) => {
Expand All @@ -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,
};
Expand Down Expand Up @@ -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;}',
},
];
}
Expand Down

0 comments on commit 578200c

Please sign in to comment.