-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy path_z-index.scss
176 lines (137 loc) · 7.45 KB
/
_z-index.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// Stores a list of z-index values in a central location. For clarity, when a
// specific value is needed, add a comment explaining why (what other rules the
// value is designed to work with).
$z-layers: (
".block-editor-block-list__block::before": 0,
".block-editor-block-switcher__arrow": 1,
".block-editor-block-list__block {core/image aligned wide or fullwide}": 20,
".block-library-classic__toolbar": 31, // When scrolled to top this toolbar needs to sit over block-editor-block-toolbar
".block-editor-block-list__layout .reusable-block-indicator": 1,
".block-editor-block-list__block-selection-button": 22,
".components-form-toggle__input": 1,
".edit-post-text-editor__toolbar": 1,
".edit-post-sidebar__panel-tab.is-active": 1,
// These next three share a stacking context
".block-editor-inserter__tabs .components-tab-panel__tab-content": 0, // lower scrolling content
".block-editor-inserter__tabs .components-tab-panel__tabs": 1, // higher sticky element
".block-editor-inserter__search": 1, // higher sticky element
// These next two share a stacking context
".interface-complementary-area .components-panel" : 0, // lower scrolling content
".interface-complementary-area .components-panel__header": 1, // higher sticky element
".components-modal__header": 10,
".edit-post-meta-boxes-area.is-loading::before": 1,
".edit-post-meta-boxes-area .spinner": 5,
".components-popover__close": 5,
".block-editor-block-list__insertion-point": 6,
".block-editor-warning": 5,
".block-library-gallery-item__inline-menu": 20,
".block-editor-url-input__suggestions": 30,
".edit-post-layout__footer": 30,
".interface-interface-skeleton__header": 30,
".edit-site-header": 62,
".edit-widgets-header": 30,
".block-library-button__inline-link .block-editor-url-input__suggestions": 6, // URL suggestions for button block above sibling inserter
".wp-block-cover__inner-container": 1, // InnerBlocks area inside cover image block
".wp-block-cover.has-background-dim::before": 1, // Overlay area inside block cover need to be higher than the video background.
".wp-block-cover__image-background": 0, // Image background inside cover block.
".wp-block-cover__video-background": 0, // Video background inside cover block.
".wp-block-template-part__placeholder-preview-filter-input": 1,
// Active pill button
".components-button {:focus or .is-primary}": 1,
// The draggable element should show up above the entire UI
".components-draggable__clone": 1000000000,
".block-editor-block-list__block .reusable-block-edit-panel *": 1,
// Show drop zone above most standard content, but below any overlays
".components-drop-zone": 40,
".components-drop-zone__content": 50,
// The floated blocks should be above the other blocks to allow selection.
"{core/image aligned left or right} .wp-block": 21,
// Needs to be below media library that has a z-index of 160000.
"{core/video track editor popover}": 160000 - 10,
// Needs to be below media library that has a z-index of 160000.
".block-editor-format-toolbar__image-popover": 160000 - 10,
// Small screen inner blocks overlay must be displayed above drop zone,
// settings menu, and movers.
".block-editor-block-list__layout.has-overlay::after": 60,
// The toolbar, when contextual, should be above any adjacent nested block click overlays.
".block-editor-block-contextual-toolbar": 61,
// The block mover, particularly in nested contexts,
// should overlap most block content.
".block-editor-block-list__block.is-{selected,hovered} .block-editor-block-mover": 61,
// Show sidebar above wp-admin navigation bar for mobile viewports:
// #wpadminbar { z-index: 99999 }
".interface-interface-skeleton__sidebar": 100000,
".edit-post-layout__toogle-sidebar-panel": 100000,
".edit-site-sidebar": 100000,
".edit-widgets-sidebar": 100000,
".edit-post-layout .edit-post-post-publish-panel": 100001,
// For larger views, the wp-admin navbar dropdown should be at top of
// the Publish Post sidebar.
".edit-post-layout .edit-post-post-publish-panel {greater than small}": 99998,
".entities-saved-states__panel": 100001,
// For larger views, the wp-admin navbar dropdown should be on top of
// the multi-entity saving sidebar.
".entities-saved-states__panel {greater than small}": 99998,
".edit-site-editor__toggle-save-panel": 100000,
// Show sidebar in greater than small viewports above editor related elements
// but below #adminmenuback { z-index: 100 }
".interface-interface-skeleton__sidebar {greater than small}": 90,
".edit-site-sidebar {greater than small}": 90,
".edit-widgets-sidebar {greater than small}": 90,
// Show interface skeleton footer above interface skeleton drawer
".interface-interface-skeleton__footer": 90,
// Show the navigation toggle above the skeleton header
".edit-site-navigation-toggle": 31,
// Show the FSE template previews above the editor (same z-index as the skeleton header)
".edit-site-navigation-panel__preview": 30,
// Show notices below expanded editor bar
// .edit-post-header { z-index: 30 }
".components-notice-list": 29,
// Above the block list and the header.
".block-editor-block-list__block-popover": 31,
// Under the block popover (block toolbar).
".block-editor-block-list__insertion-point-popover": 28,
// Show snackbars above everything (similar to popovers)
".components-snackbar-list": 100000,
// Show modal under the wp-admin menus and the popover
".components-modal__screen-overlay": 100000,
// Show popovers above wp-admin menus and submenus and sidebar:
// #adminmenuwrap { z-index: 9990 }
".components-popover": 1000000,
// Should be above the popover (dropdown)
".reusable-blocks-menu-items__convert-modal": 1000001,
// ...Except for popovers immediately beneath wp-admin menu on large breakpoints
".components-popover.block-editor-inserter__popover": 99999,
".components-popover.table-of-contents__popover": 99998,
".components-popover.block-editor-block-navigation__popover": 99998,
".components-popover.edit-post-more-menu__content": 99998,
".components-popover.edit-site-more-menu__content": 99998,
".components-popover.block-editor-rich-text__inline-format-toolbar": 99998,
".components-popover.block-editor-warning__dropdown": 99998,
".components-autocomplete__results": 1000000,
".skip-to-selected-block": 100000,
".interface-interface-skeleton__actions": 100000,
// Show NUX tips above popovers, wp-admin menus, submenus, and sidebar:
".nux-dot-tip": 1000001,
// Show tooltips above NUX tips, wp-admin menus, submenus, and sidebar:
".components-tooltip": 1000002,
// Make sure corner handles are above side handles for ResizableBox component
".components-resizable-box__handle": 2,
".components-resizable-box__side-handle": 2,
".components-resizable-box__corner-handle": 2,
// Make sure block manager sticky category titles appear above the options
".edit-post-manage-blocks-modal__category-title": 1,
// Needs to be higher than any other element as this is an overlay to catch all events
".components-tooltip .event-catcher": 100002,
// Needs to appear below other color circular picker related UI elements.
".components-circular-option-picker__option-wrapper::before": -1,
".components-circular-option-picker__option.is-pressed": 1,
// Needs to be higher than .components-circular-option-picker__option.is-pressed.
".components-circular-option-picker__option.is-pressed + svg": 2,
);
@function z-index( $key ) {
@if map-has-key( $z-layers, $key ) {
@return map-get( $z-layers, $key );
}
@error "Error: Specified z-index `#{$key}` does not exist in the mapping";
}