Repository navigation
Commit 2110993
fix(webapp): make the contrast slider's negative half actually apply
The ramps read `--theme-contrast`, and the live preview wrote the raw slider value
straight into it. Below zero that becomes a negative percentage inside
`color-mix`, which is invalid, so the browser dropped the declaration and the
token kept whatever it had - dragging into the negative range did nothing at all.
Only a full page render went through the split in root.tsx and behaved.
Both client writers now go through one `applyThemeContrast` helper that sets the
strengthen half and the fade half together, so there's a single place that knows
how a signed value maps onto the two variables.
Black's floor drops to -100, which takes the grid lines all the way to the page
colour, and "Default" on Black is now -40 rather than 0. That number mirrors the
light end: on White the rules measure 1.16:1 and 1.27:1 against their page, and
-40 puts Black's at 1.15:1 and 1.19:1 against #000 - the same near-invisible
weight from the other direction. The base palette sits at 1.33:1 and 1.46:1,
heavier than this theme wants when the rules are the only structure there.
The default tick and the "Default" label both follow the per-theme value, so
resetting on Black lands on -40.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent a344664 commit 2110993
3 files changed
Lines changed: 45 additions & 11 deletions
File tree
- apps/webapp/app
- hooks
- routes/account._index
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
63 | 79 | | |
64 | 80 | | |
65 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
879 | 881 | | |
880 | 882 | | |
881 | 883 | | |
882 | | - | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
883 | 890 | | |
884 | 891 | | |
885 | 892 | | |
| |||
898 | 905 | | |
899 | 906 | | |
900 | 907 | | |
901 | | - | |
| 908 | + | |
902 | 909 | | |
903 | 910 | | |
904 | 911 | | |
905 | 912 | | |
906 | 913 | | |
907 | 914 | | |
908 | 915 | | |
909 | | - | |
| 916 | + | |
910 | 917 | | |
911 | 918 | | |
912 | 919 | | |
| |||
1105 | 1112 | | |
1106 | 1113 | | |
1107 | 1114 | | |
1108 | | - | |
| 1115 | + | |
1109 | 1116 | | |
1110 | 1117 | | |
1111 | | - | |
1112 | | - | |
| 1118 | + | |
| 1119 | + | |
1113 | 1120 | | |
1114 | 1121 | | |
1115 | 1122 | | |
1116 | 1123 | | |
1117 | | - | |
| 1124 | + | |
1118 | 1125 | | |
1119 | 1126 | | |
1120 | 1127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
61 | 72 | | |
62 | 73 | | |
63 | 74 | | |
| |||
0 commit comments