diff --git a/packages/components/src/snackbar/list.tsx b/packages/components/src/snackbar/list.tsx index ebd1fca2518f51..5b3a82737dcd59 100644 --- a/packages/components/src/snackbar/list.tsx +++ b/packages/components/src/snackbar/list.tsx @@ -73,7 +73,6 @@ export function SnackbarList( { return ( openGeneralSidebar( hasBlockSelected ? 'edit-post/block' : 'edit-post/document' @@ -159,15 +171,6 @@ function Layout( { styles } ) { [ entitiesSavedStatesCallback ] ); - const className = classnames( 'edit-post-layout', 'is-mode-' + mode, { - 'is-sidebar-opened': sidebarIsOpened, - 'has-fixed-toolbar': hasFixedToolbar, - 'has-metaboxes': hasActiveMetaboxes, - 'show-icon-labels': showIconLabels, - 'is-distraction-free': isDistractionFree, - 'is-entity-save-view-open': !! entitiesSavedStatesCallback, - } ); - const secondarySidebarLabel = isListViewOpened ? __( 'Document Overview' ) : __( 'Block Library' ); diff --git a/packages/edit-post/src/components/layout/style.scss b/packages/edit-post/src/components/layout/style.scss index 229ab58a4e14b0..1c2f47a79d4871 100644 --- a/packages/edit-post/src/components/layout/style.scss +++ b/packages/edit-post/src/components/layout/style.scss @@ -7,14 +7,20 @@ .edit-post-layout .components-editor-notices__snackbar { position: fixed; right: 0; - bottom: 40px; - padding-left: 16px; - padding-right: 16px; + bottom: $grid-unit-50; + padding-left: $grid-unit-20; + padding-right: $grid-unit-20; } .is-distraction-free { .components-editor-notices__snackbar { - bottom: 20px; + bottom: math.div($grid-unit-50, 2); + } +} + +.has-secondary-sidebar { + .components-editor-notices__snackbar { + padding-left: $grid-unit-20 + $nav-sidebar-width; } } diff --git a/packages/edit-site/src/components/editor/index.js b/packages/edit-site/src/components/editor/index.js index 4bc77203fa8e79..98b2db21e1bead 100644 --- a/packages/edit-site/src/components/editor/index.js +++ b/packages/edit-site/src/components/editor/index.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import classnames from 'classnames'; + /** * WordPress dependencies */ @@ -148,6 +153,11 @@ export default function Editor() { return ; } + const className = classnames( { + 'show-icon-labels': showIconLabels, + 'has-secondary-sidebar': isListViewOpen || isInserterOpen, + } ); + return ( <> { isEditMode && } @@ -163,9 +173,7 @@ export default function Editor() { { isEditMode && } } content={ <> diff --git a/packages/edit-site/src/components/editor/style.scss b/packages/edit-site/src/components/editor/style.scss index 1a24d3ee1475e7..55adb8a6107c8f 100644 --- a/packages/edit-site/src/components/editor/style.scss +++ b/packages/edit-site/src/components/editor/style.scss @@ -9,11 +9,19 @@ } // Adjust the position of the notices -.edit-site .components-editor-notices__snackbar { - position: fixed; - right: 0; - bottom: 40px; - padding-left: 16px; - padding-right: 16px; +.edit-site { + .components-editor-notices__snackbar { + position: fixed; + right: 0; + bottom: $grid-unit-50; + padding-left: $grid-unit-20; + padding-right: $grid-unit-20; + } + + @include break-medium { + .has-secondary-sidebar .components-editor-notices__snackbar { + padding-left: $grid-unit-20 + $nav-sidebar-width; + } + } } @include editor-left(".edit-site .components-editor-notices__snackbar")