Skip to content

Commit 9f471e8

Browse files
committed
feat(z-index): add z-index utility classes | rename helper to utility
1 parent b768d16 commit 9f471e8

File tree

3 files changed

+58
-11
lines changed

3 files changed

+58
-11
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: 55 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
* Global utility classes
33
*****************************/
44

5+
// btn-close overrides
6+
7+
.btn-close > .icon,
8+
.btn-close.icon i {
9+
visibility: hidden;
10+
}
11+
12+
@each $name, $pair in $theme-colors {
13+
.variant-#{$name} > .btn-close {
14+
@extend .btn-close-white;
15+
}
16+
}
17+
18+
// Utlity classes
19+
520
.clickable {
621
cursor: pointer;
722
}
@@ -32,6 +47,8 @@
3247
height: unset;
3348
}
3449

50+
// Utility classes for text
51+
3552
.text-right {
3653
text-align: right;
3754
}
@@ -56,14 +73,44 @@
5673
white-space: break-spaces;
5774
}
5875

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

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

0 commit comments

Comments
 (0)