Skip to content

Commit 7e98291

Browse files
authored
fix: elevation naming to make it logical (#179)
* fix: elevation naming to make it logical
1 parent a526080 commit 7e98291

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

source/_patterns/elevation/_examples.demonstration.scss

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,12 @@
1717
background-color: $db-colors-neutral-bg-1-enabled;
1818
}
1919

20-
$list: "", $db-elevation-1, $db-elevation-2, $db-elevation-4, $db-elevation-8,
21-
$db-elevation-12, $db-elevation-24;
20+
$list: "", $db-elevation-1, $db-elevation-2, $db-elevation-3, $db-elevation-4,
21+
$db-elevation-5, $db-elevation-6;
2222

2323
@mixin elevation() {
2424
@for $i from 0 to length($list) {
2525
$className: $i;
26-
@if ($i==3) {
27-
$className: 4;
28-
}
29-
@if ($i==4) {
30-
$className: 8;
31-
}
32-
@if ($i==5) {
33-
$className: 12;
34-
}
35-
@if ($i==6) {
36-
$className: 24;
37-
}
3826
.DO-NOT-COPY-THIS-CLASS-elevation-#{$className} {
3927
@extend %elevation-placeholder;
4028

source/_patterns/elevation/examples.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<div class="DO-NOT-COPY-THIS-CLASS-elevation-0">Elevation-0</div>
66
<div class="DO-NOT-COPY-THIS-CLASS-elevation-1">Elevation-1</div>
77
<div class="DO-NOT-COPY-THIS-CLASS-elevation-2">Elevation-2</div>
8+
<div class="DO-NOT-COPY-THIS-CLASS-elevation-3">Elevation-3</div>
89
<div class="DO-NOT-COPY-THIS-CLASS-elevation-4">Elevation-4</div>
9-
<div class="DO-NOT-COPY-THIS-CLASS-elevation-8">Elevation-8</div>
10-
<div class="DO-NOT-COPY-THIS-CLASS-elevation-12">Elevation-12</div>
11-
<div class="DO-NOT-COPY-THIS-CLASS-elevation-24">Elevation-24</div>
10+
<div class="DO-NOT-COPY-THIS-CLASS-elevation-5">Elevation-5</div>
11+
<div class="DO-NOT-COPY-THIS-CLASS-elevation-6">Elevation-6</div>
1212
</div>
1313
</main>

tokens/elevation.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
"2": {
77
"value": "0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)"
88
},
9-
"4": {
9+
"3": {
1010
"value": "0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)"
1111
},
12-
"8": {
12+
"4": {
1313
"value": "0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"
1414
},
15-
"12": {
15+
"5": {
1616
"value": "0 0 6px -4px rgba(0, 0, 0, 0.2), 0 0 24px 4px rgba(0, 0, 0, 0.12), 0 0 12px 2px rgba(0, 0, 0, 0.14)"
1717
},
18-
"24": {
18+
"6": {
1919
"value": "0 0 12px -8px rgba(0, 0, 0, 0.2), 0 0 48px 8px rgba(0, 0, 0, 0.12), 0 0 24px 3px rgba(0, 0, 0, 0.14)"
2020
}
2121
}

0 commit comments

Comments
 (0)