Skip to content

Commit 4c9c6e9

Browse files
authored
feat: new z-index design tokens (#982)
Introduces new z-index tokens and adjustments for pre-existing tokens. BREAKING CHANGE: The z-index values for zIndexModal and zIndexDropdownable have increased. Closes D2IQ-92067
1 parent f3e5d1b commit 4c9c6e9

File tree

5 files changed

+31
-19
lines changed

5 files changed

+31
-19
lines changed

design-guidelines/design-tokens/color.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
33
Do not edit directly
4-
Generated by style-dictionary on Fri Mar 03 2023 15:32:54 GMT-0600 (Central Standard Time)
4+
Generated by style-dictionary on Mon Jul 24 2023 15:22:29 GMT-0500 (Central Daylight Time)
55
66
-->
77
## All Colors

design-guidelines/design-tokens/font.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
33
Do not edit directly
4-
Generated by style-dictionary on Fri Mar 03 2023 15:32:54 GMT-0600 (Central Standard Time)
4+
Generated by style-dictionary on Mon Jul 24 2023 15:22:29 GMT-0500 (Central Daylight Time)
55
66
-->
77
| Js variable name | Value |

design-guidelines/design-tokens/layout.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
33
Do not edit directly
4-
Generated by style-dictionary on Fri Mar 03 2023 15:32:54 GMT-0600 (Central Standard Time)
4+
Generated by style-dictionary on Mon Jul 24 2023 15:22:29 GMT-0500 (Central Daylight Time)
55
66
-->
77
## Breakpoints
@@ -63,6 +63,9 @@
6363
| borderRadiusLarge | 8px |
6464
| borderRadiusCircle | 50% |
6565
| textBlockWidth | 65ch |
66+
| zIndexDeep | -1 |
6667
| zIndexContent | 0 |
67-
| zIndexModal | 1 |
68-
| zIndexDropdownable | 2 |
68+
| zIndexSticky | 100 |
69+
| zIndexOverlay | 200 |
70+
| zIndexModal | 300 |
71+
| zIndexDropdownable | 400 |
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
{
2-
"layout": {
3-
"zIndex": {
4-
"content": {
5-
"value": "0"
6-
},
7-
"modal": {
8-
"value": "1"
9-
},
10-
"dropdownable": {
11-
"value": "2"
12-
}
13-
}
2+
"layout": {
3+
"zIndex": {
4+
"deep": {
5+
"value": "-1"
6+
},
7+
"content": {
8+
"value": "0"
9+
},
10+
"sticky": {
11+
"value": "100"
12+
},
13+
"overlay": {
14+
"value": "200"
15+
},
16+
"modal": {
17+
"value": "300"
18+
},
19+
"dropdownable": {
20+
"value": "400"
21+
}
1422
}
23+
}
1524
}

packages/dropdownMenu/tests/__snapshots__/DropdownMenu.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ exports[`Dropdown renders an open dropdown 1`] = `
8282
</div>
8383
<div>
8484
<div
85-
style="z-index: 2; position: absolute; left: 0px; top: 0px;"
85+
style="z-index: 400; position: absolute; left: 0px; top: 0px;"
8686
>
8787
<div
8888
aria-labelledby="downshift-1-label"
@@ -165,7 +165,7 @@ exports[`Dropdown renders an open dropdown with multiple sections 1`] = `
165165
</div>
166166
<div>
167167
<div
168-
style="z-index: 2; position: absolute; left: 0px; top: 0px;"
168+
style="z-index: 400; position: absolute; left: 0px; top: 0px;"
169169
>
170170
<div
171171
aria-labelledby="downshift-3-label"

0 commit comments

Comments
 (0)