Skip to content

Commit e005ebd

Browse files
committed
refactor: revert elevation system
1 parent 11c9fe8 commit e005ebd

26 files changed

+40
-13
lines changed

dist/css/coreui-grid.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-grid.rtl.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-grid.rtl.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-reboot.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-reboot.rtl.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-reboot.rtl.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-utilities.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-utilities.rtl.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui-utilities.rtl.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui.rtl.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/coreui.rtl.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scss/_card.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
border: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
3838
@include border-radius(var(--#{$prefix}card-border-radius));
3939
@include box-shadow(var(--#{$prefix}card-box-shadow));
40+
@include elevation(1);
4041

4142
> hr {
4243
margin-right: 0;

scss/_date-picker.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@
195195
background-clip: padding-box;
196196
border: var(--#{$prefix}date-picker-dropdown-border-width) solid var(--#{$prefix}date-picker-dropdown-border-color);
197197
@include border-radius(var(--#{$prefix}date-picker-dropdown-border-radius));
198+
@include elevation(4);
198199

199200
.date-picker.show & {
200201
display: block;

scss/_dropdown.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
border: var(--#{$prefix}dropdown-border-width) solid var(--#{$prefix}dropdown-border-color);
6262
@include border-radius(var(--#{$prefix}dropdown-border-radius));
6363
@include box-shadow(var(--#{$prefix}dropdown-box-shadow));
64+
@include elevation(4);
6465

6566
&[data-coreui-popper] {
6667
top: 100%;

scss/_footer.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@
2424
position: sticky;
2525
bottom: 0;
2626
z-index: $zindex-fixed;
27+
@include elevation(2, "top");
2728
}

scss/_header.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
position: sticky;
6565
top: 0;
6666
z-index: $zindex-sticky;
67+
@include elevation(2);
6768
}
6869
}
6970

scss/_mixins.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
// Skins
4040
@import "mixins/border-radius";
4141
@import "mixins/box-shadow";
42+
@import "mixins/elevation";
4243
@import "mixins/gradients";
4344
@import "mixins/transition";
4445

scss/_modal.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
// We deliberately don't use `-webkit-overflow-scrolling: touch;` due to a
4848
// gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
4949
// See also https://github.com/twbs/bootstrap/issues/17695
50+
@include elevation(24);
5051
}
5152

5253
// Shell div to position the modal with bottom padding

scss/_time-picker.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
background-clip: padding-box;
186186
border: var(--#{$prefix}time-picker-dropdown-border-width) solid var(--#{$prefix}time-picker-dropdown-border-color);
187187
@include border-radius(var(--#{$prefix}time-picker-dropdown-border-radius));
188+
@include elevation(4);
188189

189190
.time-picker.show & {
190191
display: block;

scss/_utilities.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,13 @@ $utilities: map-merge(
8585
)
8686
),
8787
// scss-docs-end utils-shadow
88+
// scss-docs-start utils-elevation
8889
"elevation": (
8990
property: box-shadow,
9091
class: elevation,
9192
values: $elevations
9293
),
94+
// scss-docs-end utils-elevation
9395
// scss-docs-start utils-focus-ring
9496
"focus-ring": (
9597
css-var: true,

scss/_variables.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ $enable-validation-icons: true !default;
449449
$enable-negative-margins: false !default;
450450
$enable-deprecation-messages: true !default;
451451
$enable-important-utilities: true !default;
452+
$enable-elevations: false !default;
452453
$enable-ltr: true !default;
453454
$enable-rtl: false !default;
454455

scss/forms/_form-multi-select.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ select.form-multi-select {
322322
background-clip: padding-box;
323323
border: var(--#{$prefix}form-multi-select-dropdown-border-width) solid var(--#{$prefix}form-multi-select-dropdown-border-color);
324324
@include border-radius(var(--#{$prefix}form-multi-select-dropdown-border-radius));
325+
@include elevation(4);
325326

326327
.form-multi-select.show & {
327328
display: block;

scss/mixins/_elevation.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@mixin elevation($value, $exclude: null) {
2+
@if $enable-elevations {
3+
box-shadow: map-get($elevations, $value);
4+
5+
@if $enable-dark-mode {
6+
[data-coreui-theme]:not([data-coreui-theme="dark"]) & {
7+
&:not([class*="border"]) {
8+
border: 0;
9+
}
10+
}
11+
}
12+
}
13+
}

scss/sidebar/_sidebar.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
position: fixed;
8787
top: 0;
8888
bottom: 0;
89+
@include elevation(2);
8990

9091
&:not(.sidebar-end) {
9192
@include ltr-rtl("left", 0);
@@ -132,6 +133,7 @@
132133

133134
&.show {
134135
box-shadow: var(--#{$prefix}sidebar-overlaid-box-shadow);
136+
@include elevation(3);
135137

136138
&:not(.sidebar-end) {
137139
@include ltr-rtl("margin-left", 0);

0 commit comments

Comments
 (0)