Manage z-indexes in variables

This commit is contained in:
Rigel Kent 2020-02-13 15:09:31 +01:00
parent 5a208b004a
commit 36f2981f7d
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
7 changed files with 34 additions and 12 deletions

View File

@ -16,12 +16,12 @@
top: 0; top: 0;
width: 100%; width: 100%;
background-color: var(--mainBackgroundColor); background-color: var(--mainBackgroundColor);
z-index: 1000; z-index: z(header);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
display: flex; display: flex;
.top-left-block { .top-left-block {
z-index: 1001; z-index: z(headerLeft);
height: $header-height; height: $header-height;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -1,3 +1,5 @@
@import '_mixins';
.cfp-hotkeys-container { .cfp-hotkeys-container {
display: flex !important; display: flex !important;
align-items: center; align-items: center;
@ -23,7 +25,7 @@
} }
.cfp-hotkeys-container.fade.in { .cfp-hotkeys-container.fade.in {
z-index: 10002; z-index: z(hotkeys);
visibility: visible; visibility: visible;
opacity: 1; opacity: 1;
} }

View File

@ -6,7 +6,7 @@
height: calc(100vh - #{$header-height}); height: calc(100vh - #{$header-height});
padding: 0; padding: 0;
width: $menu-width; width: $menu-width;
z-index: 11000; z-index: z(menu);
} }
menu { menu {

View File

@ -19,7 +19,7 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
} }
.dropdown { .dropdown {
z-index: 10001 !important; z-index: z(dropdown) !important;
} }
.dropdown-menu { .dropdown-menu {
@ -176,7 +176,11 @@ ngb-tabset.bootstrap {
} }
ngb-modal-backdrop { ngb-modal-backdrop {
z-index: 10000 !important; z-index: z(modal) - 1 !important;
}
ngb-modal-window {
z-index: z(modal) !important;
} }
.btn-outline-tertiary { .btn-outline-tertiary {

View File

@ -93,8 +93,24 @@ $variables: (
--embedBigPlayBackgroundColor: var(--embedBigPlayBackgroundColor) --embedBigPlayBackgroundColor: var(--embedBigPlayBackgroundColor)
); );
/*** theme helper ***/
@function var($variable) { @function var($variable) {
@return map-get($variables, $variable); @return map-get($variables, $variable);
} }
/*** z-index groups ***/
$zindex: (
header : 1000,
/* header context */
headerLeft : 10,
menu : 11000,
dropdown : 12000,
loadbar : 13000,
modal : 14000,
notification : 15000,
hotkeys : 16000
);
@function z($label) {
@return map-get($zindex, $label);
}

View File

@ -1,3 +1,4 @@
@import '_mixins';
// Thanks: https://github.com/aitboudad/ngx-loading-bar/blob/master/loading-bar.css // Thanks: https://github.com/aitboudad/ngx-loading-bar/blob/master/loading-bar.css
/* Make clicks pass-through */ /* Make clicks pass-through */
@ -20,7 +21,7 @@
background: var(--mainColor); background: var(--mainColor);
position: fixed; position: fixed;
z-index: 10002; z-index: z(loadbar);
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
@ -50,7 +51,7 @@
#loading-bar-spinner { #loading-bar-spinner {
display: block; display: block;
position: fixed; position: fixed;
z-index: 10002; z-index: z(loadbar);
top: 10px; top: 10px;
left: 10px; left: 10px;
} }

View File

@ -383,8 +383,7 @@ p-inputswitch {
p-toast { p-toast {
.ui-toast { .ui-toast {
// Modal is 10005 z-index: z(notification) !important;
z-index: 10010 !important;
} }
.ui-toast-message { .ui-toast-message {