Skip to content

Commit fa4087e

Browse files
committed
refactor: update z-indexes
1 parent 67a0077 commit fa4087e

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

scss/_header.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
&.header-sticky {
6464
position: sticky;
6565
top: 0;
66-
z-index: $zindex-fixed - 1;
66+
z-index: $zindex-sticky;
6767
}
6868
}
6969

scss/_variables.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,10 +1195,10 @@ $form-validation-states: (
11951195
$zindex-dropdown: 1000 !default;
11961196
$zindex-sticky: 1020 !default;
11971197
$zindex-fixed: 1030 !default;
1198+
$zindex-sidebar-backdrop: 1034 !default;
1199+
$zindex-sidebar: 1035 !default;
11981200
$zindex-offcanvas-backdrop: 1040 !default;
1199-
$zindex-sidebar-backdrop: 1040 !default;
12001201
$zindex-offcanvas: 1045 !default;
1201-
$zindex-sidebar-overlaid: 1045 !default;
12021202
$zindex-modal-backdrop: 1050 !default;
12031203
$zindex-modal: 1055 !default;
12041204
$zindex-popover: 1070 !default;

scss/sidebar/_sidebar-narrow.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@
99
}
1010

1111
@include media-breakpoint-up($mobile-breakpoint) {
12-
z-index: $zindex-fixed + 1;
1312
flex: 0 0 var(--#{$prefix}sidebar-narrow-width);
1413
width: var(--#{$prefix}sidebar-narrow-width);
1514
padding-bottom: var(--#{$prefix}sidebar-toggler-height);
1615
overflow: visible;
1716

1817
&.sidebar-fixed {
19-
z-index: $zindex-fixed + 1;
2018
width: var(--#{$prefix}sidebar-narrow-width);
2119
}
2220

@@ -77,7 +75,6 @@
7775

7876
.sidebar-narrow-unfoldable {
7977
position: fixed;
80-
z-index: $zindex-fixed + 1;
8178

8279
&:not(.sidebar-end) ~ * {
8380
--#{$prefix}sidebar-occupy-start: #{$sidebar-narrow-width};

scss/sidebar/_sidebar.scss

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
.sidebar {
44
// scss-docs-start sidebar-css-vars
5+
--#{$prefix}sidebar-zindex: #{$zindex-sidebar};
56
--#{$prefix}sidebar-width: #{$sidebar-width};
67
--#{$prefix}sidebar-bg: #{$sidebar-bg};
78
--#{$prefix}sidebar-padding-x: #{$sidebar-padding-x};
89
--#{$prefix}sidebar-padding-y: #{$sidebar-padding-y};
910
--#{$prefix}sidebar-color: #{$sidebar-color};
1011
--#{$prefix}sidebar-brand-color: #{$sidebar-brand-color};
1112
--#{$prefix}sidebar-brand-bg: #{$sidebar-brand-bg};
12-
--#{$prefix}sidebar-overlaid-zindex: #{$zindex-sidebar-overlaid};
1313
// scss-docs-end sidebar-css-vars
1414

1515
position: relative;
@@ -25,6 +25,12 @@
2525
box-shadow: none;
2626
@include transition($sidebar-transition);
2727

28+
&.sidebar-fixed,
29+
&.sidebar-narrow,
30+
&.sidebar-narrow-unfoldable {
31+
z-index: var(--#{$prefix}sidebar-zindex);
32+
}
33+
2834
&:not(.sidebar-end){
2935
@include ltr-rtl("margin-left", 0);
3036
~ * {
@@ -103,7 +109,6 @@
103109
position: fixed;
104110
top: 0;
105111
bottom: 0;
106-
z-index: var(--#{$prefix}sidebar-overlaid-zindex);
107112

108113
&:not(.hide) {
109114
box-shadow: $box-shadow;
@@ -130,7 +135,7 @@
130135
position: fixed;
131136
top: 0;
132137
bottom: 0;
133-
z-index: var(--#{$prefix}sidebar-overlaid-zindex);
138+
z-index: var(--#{$prefix}sidebar-zindex);
134139

135140
&:not(.sidebar-end) {
136141
@include ltr-rtl("left", 0);

0 commit comments

Comments
 (0)