Skip to content

Commit 12dbc2c

Browse files
Update dark experimental theme for top bar buttons (#11981)
### WHY are these changes introduced? Part of Shopify/archive-polaris-backlog-2024#1573 ### WHAT is this pull request doing? Updates from [this figma](https://www.figma.com/file/pGwkMhydM8nURjBRHo9GVh/Dark-UI-Lab?type=design&node-id=22078%3A19050&mode=design&t=IlsqiSZUSTqhC5Bl-1) for the `dark-experimental` theme ### How to 🎩 Check out new tokens consumed in the top bar. Open the user menu to see new divider color and white alphas https://admin.web.web-minimal-m4pm.sophie-schneider.us.spin.dev/store/shop1
1 parent 7a70238 commit 12dbc2c

File tree

4 files changed

+42
-20
lines changed

4 files changed

+42
-20
lines changed

.changeset/nice-ways-doubt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris-tokens': patch
3+
---
4+
5+
Updated internal only whiteAlpha scale and dark experimental theme with new values

polaris-tokens/src/colors.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -291,20 +291,20 @@ export const blackAlpha: ColorAlpha = {
291291
};
292292

293293
export const whiteAlpha: ColorAlpha = {
294-
1: 'rgba(255, 255, 255, 0)',
295-
2: 'rgba(255, 255, 255, 0.01)',
296-
3: 'rgba(255, 255, 255, 0.02)',
297-
4: 'rgba(255, 255, 255, 0.03)',
294+
1: 'rgba(255, 255, 255, 0.01)',
295+
2: 'rgba(255, 255, 255, 0.02)',
296+
3: 'rgba(255, 255, 255, 0.03)',
297+
4: 'rgba(255, 255, 255, 0.04)',
298298
5: 'rgba(255, 255, 255, 0.05)',
299299
6: 'rgba(255, 255, 255, 0.06)',
300300
7: 'rgba(255, 255, 255, 0.08)',
301301
8: 'rgba(255, 255, 255, 0.11)',
302-
9: 'rgba(255, 255, 255, 0.17)',
303-
10: 'rgba(255, 255, 255, 0.20)',
304-
11: 'rgba(255, 255, 255, 0.28)',
305-
12: 'rgba(255, 255, 255, 0.46)',
306-
13: 'rgba(255, 255, 255, 0.62)',
307-
14: 'rgba(255, 255, 255, 0.71)',
308-
15: 'rgba(255, 255, 255, 0.81)',
309-
16: 'rgba(255, 255, 255, 0.90)',
302+
9: 'rgba(255, 255, 255, 0.14)',
303+
10: 'rgba(255, 255, 255, 0.17)',
304+
11: 'rgba(255, 255, 255, 0.22)',
305+
12: 'rgba(255, 255, 255, 0.29)',
306+
13: 'rgba(255, 255, 255, 0.44)',
307+
14: 'rgba(255, 255, 255, 0.6)',
308+
15: 'rgba(255, 255, 255, 0.7)',
309+
16: 'rgba(255, 255, 255, 0.8)',
310310
};

polaris-tokens/src/themes/base/color.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ export type ColorBackgroundAlias =
108108
| 'avatar-two-bg-fill'
109109
| 'backdrop-bg'
110110
| 'button-gradient-bg-fill'
111+
| 'button-gradient-bg-fill-selected-experimental'
112+
| 'button-gradient-bg-fill-active-experimental'
111113
| 'checkbox-bg-surface-disabled'
112114
| 'input-bg-surface-active'
113115
| 'input-bg-surface-hover'
@@ -1167,6 +1169,14 @@ export const color: {
11671169
value:
11681170
'linear-gradient(180deg, rgba(48, 48, 48, 0) 63.53%, rgba(255, 255, 255, 0.15) 100%)',
11691171
},
1172+
'color-button-gradient-bg-fill-selected-experimental': {
1173+
value:
1174+
'linear-gradient(180deg, rgba(48, 48, 48, 0) 63.53%, rgba(255, 255, 255, 0.15) 100%)',
1175+
},
1176+
'color-button-gradient-bg-fill-active-experimental': {
1177+
value:
1178+
'linear-gradient(180deg, rgba(48, 48, 48, 0) 63.53%, rgba(255, 255, 255, 0.15) 100%)',
1179+
},
11701180
'color-checkbox-bg-surface-disabled': {
11711181
value: colors.blackAlpha[7],
11721182
},

polaris-tokens/src/themes/dark.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ export const metaThemeDarkPartial = createMetaThemePartial({
1212
'color-icon-secondary': {value: colors.gray[12]},
1313
'color-text': {value: colors.gray[8]},
1414
'color-text-secondary': {value: colors.gray[11]},
15-
'color-bg-surface-secondary-active': {value: colors.gray[13]},
16-
'color-bg-surface-secondary-hover': {value: colors.gray[14]},
15+
'color-bg-surface-secondary-active': {value: colors.whiteAlpha[9]},
16+
'color-bg-surface-secondary-hover': {value: colors.whiteAlpha[6]},
1717
'color-bg-fill-transparent': {value: colors.whiteAlpha[8]},
1818
'color-bg-fill-brand': {value: colors.gray[1]},
1919
'color-text-brand-on-bg-fill': {value: colors.gray[15]},
2020
'color-bg-surface-hover': {value: colors.gray[14]},
21-
'color-bg-fill-hover': {value: colors.gray[14]},
21+
'color-bg-fill-hover': {value: 'rgba(37, 37, 37, 1)'},
2222
'color-bg-fill-transparent-hover': {value: colors.whiteAlpha[9]},
2323
'color-bg-fill-brand-hover': {value: colors.gray[5]},
2424
'color-bg-surface-selected': {value: colors.gray[13]},
@@ -29,25 +29,32 @@ export const metaThemeDarkPartial = createMetaThemePartial({
2929
'color-bg-fill-active': {value: colors.gray[13]},
3030
'color-bg-fill-transparent-active': {value: colors.whiteAlpha[10]},
3131
'color-bg-fill-brand-active': {value: colors.gray[4]},
32+
'color-bg-fill-secondary-hover': {value: colors.whiteAlpha[8]},
3233
'color-bg-surface-brand-selected': {value: colors.gray[14]},
33-
'color-border-secondary': {value: colors.gray[13]},
34+
'color-border-secondary': {value: colors.gray[14]},
3435
'color-tooltip-tail-down-border-experimental': {
3536
value: 'rgba(60, 60, 60, 1)',
3637
},
3738
'color-tooltip-tail-up-border-experimental': {
3839
value: 'rgba(71, 71, 71, 1)',
3940
},
4041
'color-border-gradient-experimental': {
41-
value: `linear-gradient(to bottom, ${colors.whiteAlpha[9]}, ${colors.whiteAlpha[4]})`,
42+
value: `linear-gradient(to bottom, ${colors.whiteAlpha[10]}, ${colors.whiteAlpha[4]})`,
4243
},
4344
'color-border-gradient-hover-experimental': {
44-
value: `linear-gradient(to bottom, ${colors.whiteAlpha[9]}, ${colors.whiteAlpha[4]})`,
45+
value: `linear-gradient(to bottom, ${colors.whiteAlpha[10]}, ${colors.whiteAlpha[4]})`,
4546
},
4647
'color-border-gradient-selected-experimental': {
47-
value: `linear-gradient(to bottom, ${colors.blackAlpha[10]}, ${colors.whiteAlpha[10]})`,
48+
value: `linear-gradient(to bottom, ${colors.blackAlpha[16]}, ${colors.blackAlpha[11]} 10%, ${colors.whiteAlpha[11]})`,
4849
},
4950
'color-border-gradient-active-experimental': {
50-
value: `linear-gradient(to bottom, ${colors.whiteAlpha[10]}, ${colors.whiteAlpha[4]})`,
51+
value: `linear-gradient(to bottom, ${colors.blackAlpha[16]}, ${colors.blackAlpha[11]} 10%, ${colors.whiteAlpha[11]})`,
52+
},
53+
'color-button-gradient-bg-fill-selected-experimental': {
54+
value: `linear-gradient(to bottom, rgba(25, 25, 25, 1), rgba(19, 19, 19, 1) 50%, rgba(10, 10, 10, 1))`,
55+
},
56+
'color-button-gradient-bg-fill-active-experimental': {
57+
value: `linear-gradient(to bottom, rgba(33, 33, 33, 1), rgba(30, 30, 30, 1) 50%, rgba(18, 18, 18, 1))`,
5158
},
5259
},
5360
shadow: {

0 commit comments

Comments
 (0)