Skip to content

Commit 6c1b1e8

Browse files
mitul-svercel[bot]
andauthored
Fix shadowed --ds-* colour tokens in the web UI (#4271)
`packages/web/app/globals.css` redefined about 27 `--ds-*` colours with values from an unrelated palette. Those declarations sit after the `@import` of the `@workflow/web-shared` theme, so they shadowed the tokens the app was meant to use: `text-pink-600` rendered one palette while the `text-blue-600` beside it rendered another. Its `@media (prefers-color-scheme: dark)` rule carried a second, stale copy of the palette on `:root:not(.light)`, which out-specifies `.dark`. A dark-mode browser therefore got those values whatever theme the user had picked: `--ds-background-100` resolved to `hsl(0, 0%, 7%)` rather than black, and the purples came from a different hue family. Both `:root` and `.dark` now inherit their colours from the imported theme. The system-dark rule keeps its own copy, since it fires without a theme class and has nothing to inherit from, but carries the current values. `packages/web-shared/src/styles.css` and `docs/app/styles/geistdocs.css` had 13 hues rounded to two decimals; they now match the published values exactly. Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: Mitul Shah <19615826+mitul-s@users.noreply.github.com>
1 parent 7840c15 commit 6c1b1e8

4 files changed

Lines changed: 125 additions & 175 deletions

File tree

‎.changeset/ds-color-token-drift.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@workflow/web-shared': patch
3+
'@workflow/web': patch
4+
---
5+
6+
Fix the `--ds-*` colour tokens in the web UI. `packages/web/app/globals.css` redefined about 27 of them with unrelated values that shadowed the ones it imports from `@workflow/web-shared`, so `text-pink-600` rendered a different palette than the `text-blue-600` next to it. Its `prefers-color-scheme: dark` rule also carried a stale palette on a selector that out-specified `.dark`, which meant a dark-mode browser got those values whatever theme the user had picked.

‎docs/app/styles/geistdocs.css‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,17 @@
183183
--ds-gray-alpha-1000: oklch(0 0 0 / 0.91);
184184
--ds-blue-100: oklch(97.32% 0.0141 251.56);
185185
--ds-blue-200: oklch(96.29% 0.0195 250.59);
186-
--ds-blue-300: oklch(94.58% 0.0293 249.85);
187-
--ds-blue-400: oklch(91.58% 0.0473 245.12);
186+
--ds-blue-300: oklch(94.58% 0.0293 249.84870859673202);
187+
--ds-blue-400: oklch(91.58% 0.0473 245.11621922481282);
188188
--ds-blue-500: oklch(82.75% 0.0979 248.48);
189-
--ds-blue-600: oklch(73.08% 0.1583 248.13);
189+
--ds-blue-600: oklch(73.08% 0.1583 248.133320980386);
190190
--ds-blue-700: oklch(57.61% 0.2508 258.23);
191191
--ds-blue-800: oklch(51.51% 0.2399 257.85);
192-
--ds-blue-900: oklch(53.18% 0.2399 256.99);
192+
--ds-blue-900: oklch(53.18% 0.2399 256.9900584162342);
193193
--ds-blue-1000: oklch(26.67% 0.1099 254.34);
194194
--ds-red-100: oklch(96.5% 0.0223 13.09);
195-
--ds-red-200: oklch(95.41% 0.0299 14.25);
196-
--ds-red-300: oklch(94.33% 0.0369 15.01);
195+
--ds-red-200: oklch(95.41% 0.0299 14.252646656611997);
196+
--ds-red-300: oklch(94.33% 0.0369 15.011509923860523);
197197
--ds-red-400: oklch(91.51% 0.0471 19.8);
198198
--ds-red-500: oklch(84.47% 0.1018 17.71);
199199
--ds-red-600: oklch(71.12% 0.1881 21.22);
@@ -202,7 +202,7 @@
202202
--ds-red-900: oklch(54.99% 0.232 25.29);
203203
--ds-red-1000: oklch(24.8% 0.1041 18.86);
204204
--ds-amber-100: oklch(97.48% 0.0331 85.79);
205-
--ds-amber-200: oklch(96.81% 0.0495 90.24);
205+
--ds-amber-200: oklch(96.81% 0.0495 90.24227879900472);
206206
--ds-amber-300: oklch(95.93% 0.0636 90.52);
207207
--ds-amber-400: oklch(91.02% 0.1322 88.25);
208208
--ds-amber-500: oklch(86.55% 0.1583 79.63);
@@ -231,7 +231,7 @@
231231
--ds-teal-800: oklch(57.53% 0.1392 181.66);
232232
--ds-teal-900: oklch(52.08% 0.1251 182.93);
233233
--ds-teal-1000: oklch(32.11% 0.0788 179.82);
234-
--ds-purple-100: oklch(96.65% 0.0244 312.19);
234+
--ds-purple-100: oklch(96.65% 0.0244 312.1890119359961);
235235
--ds-purple-200: oklch(96.73% 0.0228 309.8);
236236
--ds-purple-300: oklch(94.85% 0.0364 310.15);
237237
--ds-purple-400: oklch(91.77% 0.0614 312.82);
@@ -241,7 +241,7 @@
241241
--ds-purple-800: oklch(48.58% 0.2638 305.73);
242242
--ds-purple-900: oklch(47.18% 0.2579 304);
243243
--ds-purple-1000: oklch(23.96% 0.13 305.66);
244-
--ds-pink-100: oklch(95.69% 0.0359 344.62);
244+
--ds-pink-100: oklch(95.69% 0.0359 344.6218910697224);
245245
--ds-pink-200: oklch(95.71% 0.0321 353.14);
246246
--ds-pink-300: oklch(93.83% 0.0451 356.29);
247247
--ds-pink-400: oklch(91.12% 0.0573 358.82);
@@ -331,11 +331,11 @@
331331
--ds-blue-300: oklch(30.86% 0.1022 255.21);
332332
--ds-blue-400: oklch(34.1% 0.121 254.74);
333333
--ds-blue-500: oklch(38.5% 0.1403 254.4);
334-
--ds-blue-600: oklch(64.94% 0.1982 251.81);
334+
--ds-blue-600: oklch(64.94% 0.1982 251.8131841760864);
335335
--ds-blue-700: oklch(57.61% 0.2321 258.23);
336336
--ds-blue-800: oklch(51.51% 0.2307 257.85);
337-
--ds-blue-900: oklch(71.7% 0.1648 250.79);
338-
--ds-blue-1000: oklch(96.75% 0.0179 242.42);
337+
--ds-blue-900: oklch(71.7% 0.1648 250.79360374054167);
338+
--ds-blue-1000: oklch(96.75% 0.0179 242.4234217368056);
339339
--ds-red-100: oklch(22.1% 0.0657 15.11);
340340
--ds-red-200: oklch(25.93% 0.0834 19.02);
341341
--ds-red-300: oklch(31.47% 0.1105 20.96);
@@ -349,7 +349,7 @@
349349
--ds-amber-100: oklch(22.46% 0.0538 76.04);
350350
--ds-amber-200: oklch(24.95% 0.0642 64.78);
351351
--ds-amber-300: oklch(32.34% 0.0837 63.83);
352-
--ds-amber-400: oklch(35.53% 0.0903 66.3);
352+
--ds-amber-400: oklch(35.53% 0.0903 66.29707162673735);
353353
--ds-amber-500: oklch(41.55% 0.1044 67.98);
354354
--ds-amber-600: oklch(75.04% 0.1737 74.49);
355355
--ds-amber-700: oklch(81.87% 0.1969 76.46);

‎packages/web-shared/src/styles.css‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,19 @@
5353
/* Blue */
5454
--ds-blue-100: oklch(97.32% 0.0141 251.56);
5555
--ds-blue-200: oklch(96.29% 0.0195 250.59);
56-
--ds-blue-300: oklch(94.58% 0.0293 249.85);
57-
--ds-blue-400: oklch(91.58% 0.0473 245.12);
56+
--ds-blue-300: oklch(94.58% 0.0293 249.84870859673202);
57+
--ds-blue-400: oklch(91.58% 0.0473 245.11621922481282);
5858
--ds-blue-500: oklch(82.75% 0.0979 248.48);
59-
--ds-blue-600: oklch(73.08% 0.1583 248.13);
59+
--ds-blue-600: oklch(73.08% 0.1583 248.133320980386);
6060
--ds-blue-700: oklch(57.61% 0.2508 258.23);
6161
--ds-blue-800: oklch(51.51% 0.2399 257.85);
62-
--ds-blue-900: oklch(53.18% 0.2399 256.99);
62+
--ds-blue-900: oklch(53.18% 0.2399 256.9900584162342);
6363
--ds-blue-1000: oklch(26.67% 0.1099 254.34);
6464

6565
/* Red */
6666
--ds-red-100: oklch(96.5% 0.0223 13.09);
67-
--ds-red-200: oklch(95.41% 0.0299 14.25);
68-
--ds-red-300: oklch(94.33% 0.0369 15.01);
67+
--ds-red-200: oklch(95.41% 0.0299 14.252646656611997);
68+
--ds-red-300: oklch(94.33% 0.0369 15.011509923860523);
6969
--ds-red-400: oklch(91.51% 0.0471 19.8);
7070
--ds-red-500: oklch(84.47% 0.1018 17.71);
7171
--ds-red-600: oklch(71.12% 0.1881 21.22);
@@ -76,7 +76,7 @@
7676

7777
/* Amber */
7878
--ds-amber-100: oklch(97.48% 0.0331 85.79);
79-
--ds-amber-200: oklch(96.81% 0.0495 90.24);
79+
--ds-amber-200: oklch(96.81% 0.0495 90.24227879900472);
8080
--ds-amber-300: oklch(95.93% 0.0636 90.52);
8181
--ds-amber-400: oklch(91.02% 0.1322 88.25);
8282
--ds-amber-500: oklch(86.55% 0.1583 79.63);
@@ -111,7 +111,7 @@
111111
--ds-teal-1000: oklch(32.11% 0.0788 179.82);
112112

113113
/* Purple */
114-
--ds-purple-100: oklch(96.65% 0.0244 312.19);
114+
--ds-purple-100: oklch(96.65% 0.0244 312.1890119359961);
115115
--ds-purple-200: oklch(96.73% 0.0228 309.8);
116116
--ds-purple-300: oklch(94.85% 0.0364 310.15);
117117
--ds-purple-400: oklch(91.77% 0.0614 312.82);
@@ -123,7 +123,7 @@
123123
--ds-purple-1000: oklch(23.96% 0.13 305.66);
124124

125125
/* Pink */
126-
--ds-pink-100: oklch(95.69% 0.0359 344.62);
126+
--ds-pink-100: oklch(95.69% 0.0359 344.6218910697224);
127127
--ds-pink-200: oklch(95.71% 0.0321 353.14);
128128
--ds-pink-300: oklch(93.83% 0.0451 356.29);
129129
--ds-pink-400: oklch(91.12% 0.0573 358.82);
@@ -177,11 +177,11 @@
177177
--ds-blue-300: oklch(30.86% 0.1022 255.21);
178178
--ds-blue-400: oklch(34.1% 0.121 254.74);
179179
--ds-blue-500: oklch(38.5% 0.1403 254.4);
180-
--ds-blue-600: oklch(64.94% 0.1982 251.81);
180+
--ds-blue-600: oklch(64.94% 0.1982 251.8131841760864);
181181
--ds-blue-700: oklch(57.61% 0.2321 258.23);
182182
--ds-blue-800: oklch(51.51% 0.2307 257.85);
183-
--ds-blue-900: oklch(71.7% 0.1648 250.79);
184-
--ds-blue-1000: oklch(96.75% 0.0179 242.42);
183+
--ds-blue-900: oklch(71.7% 0.1648 250.79360374054167);
184+
--ds-blue-1000: oklch(96.75% 0.0179 242.4234217368056);
185185

186186
--ds-red-100: oklch(22.1% 0.0657 15.11);
187187
--ds-red-200: oklch(25.93% 0.0834 19.02);
@@ -197,7 +197,7 @@
197197
--ds-amber-100: oklch(22.46% 0.0538 76.04);
198198
--ds-amber-200: oklch(24.95% 0.0642 64.78);
199199
--ds-amber-300: oklch(32.34% 0.0837 63.83);
200-
--ds-amber-400: oklch(35.53% 0.0903 66.3);
200+
--ds-amber-400: oklch(35.53% 0.0903 66.29707162673735);
201201
--ds-amber-500: oklch(41.55% 0.1044 67.98);
202202
--ds-amber-600: oklch(75.04% 0.1737 74.49);
203203
--ds-amber-700: oklch(81.87% 0.1969 76.46);

0 commit comments

Comments
 (0)