Skip to content

Commit 492f88d

Browse files
authored
Merge pull request #76 from oruga-ui/add-z-index-classes
feat(utility): add z index classes
2 parents ff56b12 + edf6e67 commit 492f88d

File tree

3 files changed

+59
-12
lines changed

3 files changed

+59
-12
lines changed

src/assets/scss/bootstrap.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Oruga Theme Boostrap
33
***************************/
44

5-
// Globals, helpers and functions
5+
// Globals, utility and functions
66
@import "utils/animations";
77
@import "utils/functions";
8-
@import "utils/helpers";
8+
@import "utils/utility";
99
@import "utils/root";
1010

1111
// Oruga components

src/assets/scss/utils/_all.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import "functions";
22
@import "variables";
33
@import "maps";
4-
@import "helpers";
4+
@import "utility";
55
@import "animations";
66
@import "root";
Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22
* Global utility classes
33
*****************************/
44

5+
// btn-close overrides
6+
7+
.btn-close > .icon,
8+
.btn-close.icon > i,
9+
.btn-close.icon > svg {
10+
visibility: hidden;
11+
}
12+
13+
@each $name, $pair in $theme-colors {
14+
.variant-#{$name} > .btn-close {
15+
@extend .btn-close-white;
16+
}
17+
}
18+
19+
// Utlity classes
20+
521
.clickable {
622
cursor: pointer;
723
}
@@ -32,6 +48,8 @@
3248
height: unset;
3349
}
3450

51+
// Utility classes for text
52+
3553
.text-right {
3654
text-align: right;
3755
}
@@ -56,15 +74,44 @@
5674
white-space: break-spaces;
5775
}
5876

59-
// btn-close overrides
60-
.btn-close > .icon,
61-
.btn-close.icon > i,
62-
.btn-close.icon > svg {
63-
visibility: hidden;
77+
// Utitlity classes for z-index sass variables (see https://getbootstrap.com/docs/5.3/layout/z-index/)
78+
79+
.z-dropdown {
80+
z-index: $zindex-dropdown;
6481
}
6582

66-
@each $name, $pair in $theme-colors {
67-
.variant-#{$name} > .btn-close {
68-
@extend .btn-close-white;
69-
}
83+
.z-sticky {
84+
z-index: $zindex-sticky;
85+
}
86+
87+
.z-fixed {
88+
z-index: $zindex-fixed;
89+
}
90+
91+
.z-offcanvas-backdrop {
92+
z-index: $zindex-offcanvas-backdrop;
93+
}
94+
95+
.z-offcanvas {
96+
z-index: $zindex-offcanvas;
97+
}
98+
99+
.z-modal-backdrop {
100+
z-index: $zindex-modal-backdrop;
101+
}
102+
103+
.z-modal {
104+
z-index: $zindex-modal;
105+
}
106+
107+
.z-popover {
108+
z-index: $zindex-popover;
109+
}
110+
111+
.z-tooltip {
112+
z-index: $zindex-tooltip;
113+
}
114+
115+
.z-toast {
116+
z-index: $zindex-toast;
70117
}

0 commit comments

Comments
 (0)