Skip to content

Commit 80b29ff

Browse files
committed
Inline sticky search z-index values
1 parent 6c85663 commit 80b29ff

4 files changed

Lines changed: 3 additions & 9 deletions

File tree

packages/base-styles/_z-index.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ $z-layers: (
88
".block-editor-block-list__block.is-selected": 20,
99
".editor-text-editor__toolbar": 1,
1010

11-
// These next three share a stacking context
12-
".block-library-template-part__selection-search": 2, // higher sticky element
13-
".block-library-query-pattern__selection-search": 2, // higher sticky element
14-
".editor-post-template__swap-template-search": 2, // higher sticky element
15-
1611
".components-modal__header": 10,
1712
".edit-post-meta-boxes-area.is-loading::before": 1,
1813
".edit-post-meta-boxes-area .spinner": 5,

packages/block-library/src/query/editor.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
@use "@wordpress/base-styles/colors" as *;
33
@use "@wordpress/base-styles/mixins" as *;
44
@use "@wordpress/base-styles/variables" as *;
5-
@use "@wordpress/base-styles/z-index" as *;
65

76
.block-library-query-pattern__selection-modal {
87
.block-editor-block-patterns-list {
@@ -25,7 +24,7 @@
2524
padding: $grid-unit-20 0;
2625
transform: translateY(- $grid-unit-05); // Offsets the top padding on the modal content container
2726
margin-bottom: - $grid-unit-05;
28-
z-index: z-index(".block-library-query-pattern__selection-search");
27+
z-index: 2; // Above the BlockPreview z-index: 1 overlay in the scrolling list.
2928
}
3029
}
3130

packages/block-library/src/template-part/editor.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
position: sticky;
2626
top: 0;
2727
padding: $grid-unit-20 0;
28-
z-index: z-index(".block-library-template-part__selection-search");
28+
z-index: 2; // Above the BlockPreview z-index: 1 overlay in the scrolling list.
2929
}
3030

3131
// We don't use .is-outline-mode in this case so colors take effect properly in the block editor.

packages/editor/src/components/post-template/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
padding: $grid-unit-20 0;
1414
transform: translateY(- $grid-unit-05); // Offsets the top padding on the modal content container
1515
margin-bottom: - $grid-unit-05;
16-
z-index: z-index(".editor-post-template__swap-template-search");
16+
z-index: 2; // Above the BlockPreview z-index: 1 overlay in the scrolling list.
1717
}
1818
}
1919

0 commit comments

Comments
 (0)