-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy path_z-index.scss
121 lines (96 loc) · 4.92 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
// 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-edit::before": 0,
".block-editor-block-switcher__arrow": 1,
".block-editor-block-list__block {core/image aligned wide or fullwide}": 20,
".block-library-classic__toolbar": 10,
".block-editor-block-list__layout .reusable-block-indicator": 1,
".block-editor-block-list__breadcrumb": 2,
".editor-inner-blocks .block-editor-block-list__breadcrumb": 22,
".components-form-toggle__input": 1,
".components-panel__header.edit-post-sidebar__panel-tabs": -1,
".edit-post-sidebar .components-panel": -2,
".block-editor-inserter__tabs": 1,
".block-editor-inserter__tab.is-active": 1,
".components-panel__header": 1,
".components-modal__header": 10,
".edit-post-meta-boxes-area.is-loading::before": 1,
".edit-post-meta-boxes-area .spinner": 5,
".block-editor-block-contextual-toolbar": 21,
".components-popover__close": 5,
".block-editor-block-list__insertion-point": 6,
".block-editor-inserter-with-shortcuts": 5,
".block-editor-warning": 5,
".block-library-gallery-item__inline-menu": 20,
".block-editor-url-input__suggestions": 30,
".edit-post-header": 30,
".edit-widgets-header": 30,
".block-library-button__inline-link .block-editor-url-input__suggestions": 6, // URL suggestions for button block above sibling inserter
".block-library-image__resize-handlers": 1, // Resize handlers 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__video-background": 0, // Video background inside cover block.
// Side UI active buttons
".block-editor-block-mover__control": 1,
// Active pill button
".components-button.is-button {:focus or .is-primary}": 1,
// The draggable element should show up above the entire UI
".components-draggable__clone": 1000000000,
// Should have higher index than the inset/underlay used for dragging
".components-placeholder__fieldset": 1,
".block-editor-block-list__block-edit .reusable-block-edit-panel *": 1,
// Show drop zone above most standard content, but below any overlays
".components-drop-zone": 100,
".components-drop-zone__content": 110,
// The block mover, particularly in nested contexts,
// should overlap most block content.
".block-editor-block-list__block.is-{selected,hovered} .block-editor-block-mover": 80,
// The block mover for floats should overlap the controls of adjacent blocks.
".block-editor-block-list__block {core/image aligned left or right}": 81,
// Small screen inner blocks overlay must be displayed above drop zone,
// settings menu, and movers.
".block-editor-inner-blocks__small-screen-overlay:after": 120,
// Show sidebar above wp-admin navigation bar for mobile viewports:
// #wpadminbar { z-index: 99999 }
".edit-post-sidebar": 100000,
".edit-widgets-sidebar": 100000,
".edit-post-layout .edit-post-post-publish-panel": 100001,
// Show sidebar in greater than small viewports above editor related elements
// but bellow #adminmenuback { z-index: 100 }
".edit-post-sidebar {greater than small}": 90,
// Show notices below expanded editor bar
// .edit-post-header { z-index: 30 }
".components-notice-list": 29,
// 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,
// Shows adminbar quicklink submenu above bottom popover:
// #wpadminbar ul li {z-index: 99999;}
".components-popover:not(.is-mobile).is-bottom": 99990,
// Shows above edit post sidebar; Specificity needs to be higher than 3 classes.
".block-editor__container .components-popover.components-color-palette__picker.is-bottom": 100001,
".block-editor__container .components-popover.components-font-size-picker__dropdown-content.is-bottom": 100001,
".edit-post-post-visibility__dialog.components-popover.is-bottom": 100001,
".components-autocomplete__results": 1000000,
".skip-to-selected-block": 100000,
".edit-post-toggle-publish-panel": 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__side-handle": 1,
".components-resizable-box__corner-handle": 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";
}