Skip to content

Commit 76f1377

Browse files
mirkaciampo
andauthored
Block Manager: Inline z-index values (WordPress#77759)
* Block manager: Inline z-index values * Simplify * Add changelogs Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
1 parent 604c144 commit 76f1377

5 files changed

Lines changed: 12 additions & 10 deletions

File tree

packages/base-styles/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
### Breaking Changes
66

7-
- Remove the following entries from the `z-index()` helper ([#77753](https://github.com/WordPress/gutenberg/pull/77753), [#77806](https://github.com/WordPress/gutenberg/pull/77806), [#77808](https://github.com/WordPress/gutenberg/pull/77808)):
7+
- Remove the following entries from the `z-index()` helper ([#77753](https://github.com/WordPress/gutenberg/pull/77753), [#77759](https://github.com/WordPress/gutenberg/pull/77759), [#77806](https://github.com/WordPress/gutenberg/pull/77806), [#77808](https://github.com/WordPress/gutenberg/pull/77808)):
8+
- `.block-editor-block-manager__category-title`
9+
- `.block-editor-block-manager__disabled-blocks-count`
810
- `.block-library-query-pattern__selection-search`
911
- `.block-library-template-part__selection-search`
1012
- `.edit-site-sidebar-navigation-screen__title-icon`

packages/base-styles/_z-index.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@ $z-layers: (
123123
// Show tooltips above NUX tips, wp-admin menus, submenus, and sidebar:
124124
".components-tooltip": 1000002,
125125

126-
// Make sure block manager sticky category titles appear above the options
127-
".block-editor-block-manager__category-title": 1,
128-
// And block manager sticky disabled block count is higher still
129-
".block-editor-block-manager__disabled-blocks-count": 2,
130-
131126
// Appear under the customizer heading UI, but over anything else.
132127
".customize-widgets__topbar": 8,
133128

packages/block-editor/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Enhancements
6+
7+
- `BlockManager`: Add stacking context isolation to category list ([#77759](https://github.com/WordPress/gutenberg/pull/77759)).
8+
59
## 15.18.0 (2026-04-29)
610

711
### Enhancements

packages/block-editor/src/components/block-manager/style.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@use "@wordpress/base-styles/variables" as *;
22
@use "@wordpress/base-styles/colors" as *;
3-
@use "@wordpress/base-styles/z-index" as *;
43

54
.block-editor-block-manager__no-results {
65
font-style: italic;
@@ -9,6 +8,7 @@
98
}
109

1110
.block-editor-block-manager__category {
11+
isolation: isolate;
1212
margin: 0 0 $grid-unit-30 0;
1313
}
1414

@@ -17,7 +17,8 @@
1717
top: - $grid-unit-05; // Offsets the top padding on the modal content container
1818
padding: $grid-unit-20 0;
1919
background-color: $white;
20-
z-index: z-index(".block-editor-block-manager__category-title");
20+
// Make sure sticky category titles appear above the options.
21+
z-index: 1;
2122

2223
.components-checkbox-control__label {
2324
font-weight: 600;

packages/editor/src/components/block-visibility/style.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@use "@wordpress/base-styles/colors" as *;
22
@use "@wordpress/base-styles/variables" as *;
3-
@use "@wordpress/base-styles/z-index" as *;
43

54
.editor-block-visibility__disabled-blocks-count {
65
border: $border-width solid $gray-300;
@@ -13,7 +12,8 @@
1312
position: sticky;
1413
// When sticking, tuck the top border beneath the modal header border
1514
top: ($grid-unit-05 + 1) * -1;
16-
z-index: z-index(".block-editor-block-manager__disabled-blocks-count");
15+
// Keep the sticky disabled block count above the category items.
16+
z-index: 1;
1717

1818
// Stick the category titles to the bottom
1919
~ .block-editor-block-manager__content .block-editor-block-manager__category-title {

0 commit comments

Comments
 (0)