Skip to content

Commit 18aa11c

Browse files
committed
refactor(Sidebar): update z-index
1 parent ecfa417 commit 18aa11c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

scss/_variables.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,9 +1185,10 @@ $form-validation-states: (
11851185
$zindex-dropdown: 1000 !default;
11861186
$zindex-sticky: 1020 !default;
11871187
$zindex-fixed: 1030 !default;
1188-
$zindex-sidebar-backdrop: 1030 !default;
11891188
$zindex-offcanvas-backdrop: 1040 !default;
1189+
$zindex-sidebar-backdrop: 1040 !default;
11901190
$zindex-offcanvas: 1045 !default;
1191+
$zindex-sidebar-overlaid: 1045 !default;
11911192
$zindex-modal-backdrop: 1050 !default;
11921193
$zindex-modal: 1055 !default;
11931194
$zindex-popover: 1070 !default;

scss/sidebar/_sidebar.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
--#{$prefix}sidebar-color: #{$sidebar-color};
1010
--#{$prefix}sidebar-brand-color: #{$sidebar-brand-color};
1111
--#{$prefix}sidebar-brand-bg: #{$sidebar-brand-bg};
12+
--#{$prefix}sidebar-overlaid-zindex: #{$zindex-sidebar-overlaid};
1213
// scss-docs-end sidebar-css-vars
1314

1415
position: relative;
@@ -79,7 +80,6 @@
7980
position: fixed;
8081
top: 0;
8182
bottom: 0;
82-
z-index: $zindex-fixed;
8383

8484
&:not(.sidebar-end) {
8585
@include ltr-rtl("left", 0);
@@ -103,7 +103,7 @@
103103
position: fixed;
104104
top: 0;
105105
bottom: 0;
106-
z-index: $zindex-fixed + 2;
106+
z-index: var(--#{$prefix}sidebar-overlaid-zindex);
107107

108108
&:not(.hide) {
109109
box-shadow: $box-shadow;
@@ -130,7 +130,7 @@
130130
position: fixed;
131131
top: 0;
132132
bottom: 0;
133-
z-index: $zindex-fixed + 1;
133+
z-index: var(--#{$prefix}sidebar-overlaid-zindex);
134134

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

0 commit comments

Comments
 (0)