From 589e819463966bca128ed90c31234da78b06c425 Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Thu, 30 Apr 2026 00:15:32 +0900 Subject: [PATCH 1/3] Inline edit site layout z-index values --- packages/base-styles/_z-index.scss | 5 +---- packages/edit-site/src/components/layout/style.scss | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/base-styles/_z-index.scss b/packages/base-styles/_z-index.scss index e47e1cc51b45fb..4534cde6a7d5e1 100644 --- a/packages/base-styles/_z-index.scss +++ b/packages/base-styles/_z-index.scss @@ -146,11 +146,8 @@ $z-layers: ( // Appear under the topbar. ".customize-widgets__block-toolbar": 7, - // Site editor layout + // Site editor ".edit-site-templates__dataviews-list-pagination": 2, - ".edit-site-layout__canvas-container": 2, - ".edit-site-layout__sidebar": 1, - ".edit-site-layout__canvas-container.is-resizing::after": 100, // Title needs to appear above other UI the section content. ".edit-site-sidebar-navigation-screen__title-icon": 1, diff --git a/packages/edit-site/src/components/layout/style.scss b/packages/edit-site/src/components/layout/style.scss index 540e26aaa41056..63efb386379a05 100644 --- a/packages/edit-site/src/components/layout/style.scss +++ b/packages/edit-site/src/components/layout/style.scss @@ -23,7 +23,7 @@ } .edit-site-layout__sidebar-region { - z-index: z-index(".edit-site-layout__sidebar"); + z-index: 1; width: 100vw; flex-shrink: 0; @@ -60,7 +60,7 @@ .edit-site-layout__mobile { position: relative; width: 100%; - z-index: z-index(".edit-site-layout__canvas-container"); + z-index: 2; display: flex; flex-direction: column; @@ -84,7 +84,7 @@ .edit-site-layout__canvas-container { position: relative; flex-grow: 1; - z-index: z-index(".edit-site-layout__canvas-container"); + z-index: 2; // When animating the frame size can exceed its container size. overflow: visible; @@ -97,7 +97,7 @@ right: 0; bottom: 0; content: ""; - z-index: z-index(".edit-site-layout__canvas-container.is-resizing::after"); + z-index: 100; } } From 26a0dbe53cbec710eb1c158e355a560d534c32dd Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Thu, 30 Apr 2026 01:48:58 +0900 Subject: [PATCH 2/3] Add changelog --- packages/base-styles/CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/base-styles/CHANGELOG.md b/packages/base-styles/CHANGELOG.md index 64da979b9c908d..98476a081fdd14 100644 --- a/packages/base-styles/CHANGELOG.md +++ b/packages/base-styles/CHANGELOG.md @@ -4,7 +4,7 @@ ### Breaking Changes -- Remove the following entries from the `z-index()` helper ([#77619](https://github.com/WordPress/gutenberg/pull/77619), [#77620](https://github.com/WordPress/gutenberg/pull/77620), [#77621](https://github.com/WordPress/gutenberg/pull/77621), [#77714](https://github.com/WordPress/gutenberg/pull/77714), [#77715](https://github.com/WordPress/gutenberg/pull/77715), [#77717](https://github.com/WordPress/gutenberg/pull/77717), [#77774](https://github.com/WordPress/gutenberg/pull/77774)): +- Remove the following entries from the `z-index()` helper ([#77619](https://github.com/WordPress/gutenberg/pull/77619), [#77620](https://github.com/WordPress/gutenberg/pull/77620), [#77621](https://github.com/WordPress/gutenberg/pull/77621), [#77714](https://github.com/WordPress/gutenberg/pull/77714), [#77715](https://github.com/WordPress/gutenberg/pull/77715), [#77717](https://github.com/WordPress/gutenberg/pull/77717), [#77774](https://github.com/WordPress/gutenberg/pull/77774), [#77807](https://github.com/WordPress/gutenberg/pull/77807)): - `.block-editor-block-contextual-toolbar` - `.block-editor-block-list__block {core/image aligned wide or fullwide}` - `.block-editor-block-list__block::before` @@ -30,6 +30,9 @@ - `.components-resizable-box__corner-handle` - `.dataviews-action-modal__quick-edit` - `.edit-site-editor__toggle-save-panel` + - `.edit-site-layout__canvas-container` + - `.edit-site-layout__canvas-container.is-resizing::after` + - `.edit-site-layout__sidebar` - `.edit-site-template-panel__replace-template-modal` - `.edit-widgets-header` - `.edit-widgets-sidebar {greater than small}` From 43ca8d21744b0e032b99b0cf755acf12c9b147a0 Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Tue, 5 May 2026 00:48:04 +0900 Subject: [PATCH 3/3] Remove dead CSS --- packages/edit-site/src/components/layout/style.scss | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/edit-site/src/components/layout/style.scss b/packages/edit-site/src/components/layout/style.scss index 63efb386379a05..c8b534295589e9 100644 --- a/packages/edit-site/src/components/layout/style.scss +++ b/packages/edit-site/src/components/layout/style.scss @@ -87,18 +87,6 @@ z-index: 2; // When animating the frame size can exceed its container size. overflow: visible; - - &.is-resizing::after { - // This covers the whole content which ensures mouse up triggers - // even if the content is "inert". - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - content: ""; - z-index: 100; - } } .edit-site-layout__canvas {