@firestitch/style 18.1.2 → 18.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestitch/style",
3
- "version": "18.1.2",
3
+ "version": "18.2.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Firestitch/ngx-style"
@@ -17,10 +17,23 @@
17
17
  // palette happens to use, and an undefined custom property is invalid at
18
18
  // computed-value time, so a CHECKED box renders unstyled rather than branded.
19
19
  //
20
- // Nothing here is app-specific. Every value is either the shared --fs-* contract
21
- // or a light-dark() pair restating this package's own default, so an app that
22
- // sets nothing still renders correctly in both schemes and an app that maps
23
- // --fs-color-primary onto its brand gets its brand for free.
20
+ // Nothing here is app-specific. Every value is the shared --fs-* contract with
21
+ // this package's own dark default restated as the fallback, so an app that sets
22
+ // nothing still renders, and an app that maps --fs-color-primary onto its brand
23
+ // gets its brand for free.
24
+ //
25
+ // THE FALLBACKS ARE PLAIN LITERALS, NEVER light-dark() - 18.2.1. They were
26
+ // light-dark() pairs, and esbuild does not merely downlevel those on a host
27
+ // whose browserslist includes a pre-123 engine: seeing
28
+ // `var(--name, light-dark(A, B))` it folds the WHOLE expression to the literal
29
+ // A and discards the var() reference entirely. The control then never reads the
30
+ // token at all, so no amount of fixing the token's value changes anything on
31
+ // screen - three published versions in a row changed nothing for exactly this
32
+ // reason. The source looked right every time; only the served CSS showed a bare
33
+ // `rgba(0, 0, 0, 0.54)` where a var() should have been.
34
+ //
35
+ // A fallback exists for the case where this package's own token block never
36
+ // loaded, which is a single-value situation by definition. Keep them literal.
24
37
  //
25
38
  // ONE FILE FOR THE FAMILY, not one control at a time. These were fixed app-side
26
39
  // one control at a time for years, which is why a project could have a correct
@@ -60,10 +73,10 @@
60
73
  // pick for its dividers. --fs-color-text-muted is the token that means
61
74
  // "visible but secondary", which is the job, and it lands near Material's
62
75
  // own default (0.54) rather than under it.
63
- --mat-checkbox-unselected-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
64
- --mat-checkbox-unselected-hover-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
65
- --mat-checkbox-unselected-focus-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
66
- --mat-checkbox-unselected-pressed-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
76
+ --mat-checkbox-unselected-icon-color: var(--fs-color-text-muted, #97A5A6);
77
+ --mat-checkbox-unselected-hover-icon-color: var(--fs-color-text-muted, #97A5A6);
78
+ --mat-checkbox-unselected-focus-icon-color: var(--fs-color-text-muted, #97A5A6);
79
+ --mat-checkbox-unselected-pressed-icon-color: var(--fs-color-text-muted, #97A5A6);
67
80
 
68
81
  // Checked: the brand fills the box and the checkmark sits on it. The
69
82
  // checkmark reads the SURFACE colour rather than white, so it stays legible
@@ -71,41 +84,41 @@
71
84
  --mat-checkbox-selected-icon-color: var(--fs-color-primary, #1B474E);
72
85
  --mat-checkbox-selected-hover-icon-color: var(--fs-color-primary, #1B474E);
73
86
  --mat-checkbox-selected-focus-icon-color: var(--fs-color-primary, #1B474E);
74
- --mat-checkbox-selected-checkmark-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
87
+ --mat-checkbox-selected-checkmark-color: var(--fs-surface-background, #232428);
75
88
 
76
- --mat-checkbox-label-text-color: var(--fs-color-text, light-dark(rgba(0, 0, 0, 0.87), #E8EDEC));
77
- --mat-checkbox-disabled-label-color: var(--fs-color-text-faint, light-dark(rgba(0, 0, 0, 0.38), #6A7779));
78
- --mat-checkbox-disabled-unselected-icon-color: var(--fs-hairline, light-dark(#f0f0f0, rgba(255, 255, 255, 0.22)));
79
- --mat-checkbox-disabled-selected-icon-color: var(--fs-hairline-strong, light-dark(rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0.38)));
89
+ --mat-checkbox-label-text-color: var(--fs-color-text, #E8EDEC);
90
+ --mat-checkbox-disabled-label-color: var(--fs-color-text-faint, #6A7779);
91
+ --mat-checkbox-disabled-unselected-icon-color: var(--fs-hairline, rgba(255, 255, 255, 0.22));
92
+ --mat-checkbox-disabled-selected-icon-color: var(--fs-hairline-strong, rgba(255, 255, 255, 0.38));
80
93
 
81
94
  // The wash under a hover or press. Translucent, never a fixed grey: it takes
82
95
  // its tone from whatever is behind it and so reads in both schemes.
83
- --mat-checkbox-unselected-hover-state-layer-color: var(--fs-color-hover, light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.08)));
84
- --mat-checkbox-unselected-pressed-state-layer-color: var(--fs-color-hover, light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.08)));
85
- --mat-checkbox-selected-hover-state-layer-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
86
- --mat-checkbox-selected-pressed-state-layer-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
96
+ --mat-checkbox-unselected-hover-state-layer-color: var(--fs-color-hover, rgba(255, 255, 255, 0.08));
97
+ --mat-checkbox-unselected-pressed-state-layer-color: var(--fs-color-hover, rgba(255, 255, 255, 0.08));
98
+ --mat-checkbox-selected-hover-state-layer-color: var(--fs-color-selected, rgba(255, 255, 255, 0.12));
99
+ --mat-checkbox-selected-pressed-state-layer-color: var(--fs-color-selected, rgba(255, 255, 255, 0.12));
87
100
 
88
101
  // =========================================================================
89
102
  // RADIO
90
103
  // =========================================================================
91
104
  // Same three questions as the checkbox, same answers - the two controls
92
105
  // differ in shape and in whether they are exclusive, never in colour.
93
- --mat-radio-unselected-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
94
- --mat-radio-unselected-hover-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
95
- --mat-radio-unselected-focus-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
96
- --mat-radio-unselected-pressed-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
106
+ --mat-radio-unselected-icon-color: var(--fs-color-text-muted, #97A5A6);
107
+ --mat-radio-unselected-hover-icon-color: var(--fs-color-text-muted, #97A5A6);
108
+ --mat-radio-unselected-focus-icon-color: var(--fs-color-text-muted, #97A5A6);
109
+ --mat-radio-unselected-pressed-icon-color: var(--fs-color-text-muted, #97A5A6);
97
110
 
98
111
  --mat-radio-selected-icon-color: var(--fs-color-primary, #1B474E);
99
112
  --mat-radio-selected-hover-icon-color: var(--fs-color-primary, #1B474E);
100
113
  --mat-radio-selected-focus-icon-color: var(--fs-color-primary, #1B474E);
101
114
  --mat-radio-selected-pressed-icon-color: var(--fs-color-primary, #1B474E);
102
115
 
103
- --mat-radio-label-text-color: var(--fs-color-text, light-dark(rgba(0, 0, 0, 0.87), #E8EDEC));
104
- --mat-radio-disabled-label-color: var(--fs-color-text-faint, light-dark(rgba(0, 0, 0, 0.38), #6A7779));
105
- --mat-radio-disabled-unselected-icon-color: var(--fs-hairline, light-dark(#f0f0f0, rgba(255, 255, 255, 0.22)));
106
- --mat-radio-disabled-selected-icon-color: var(--fs-hairline-strong, light-dark(rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0.38)));
107
- --mat-radio-ripple-color: var(--fs-color-hover, light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.08)));
108
- --mat-radio-checked-ripple-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
116
+ --mat-radio-label-text-color: var(--fs-color-text, #E8EDEC);
117
+ --mat-radio-disabled-label-color: var(--fs-color-text-faint, #6A7779);
118
+ --mat-radio-disabled-unselected-icon-color: var(--fs-hairline, rgba(255, 255, 255, 0.22));
119
+ --mat-radio-disabled-selected-icon-color: var(--fs-hairline-strong, rgba(255, 255, 255, 0.38));
120
+ --mat-radio-ripple-color: var(--fs-color-hover, rgba(255, 255, 255, 0.08));
121
+ --mat-radio-checked-ripple-color: var(--fs-color-selected, rgba(255, 255, 255, 0.12));
109
122
 
110
123
  // =========================================================================
111
124
  // SLIDE TOGGLE
@@ -113,15 +126,15 @@
113
126
  // The toggle is a TRACK with a HANDLE on it, so "unselected" is two colours
114
127
  // rather than one: the track is the hairline it sits in, and the handle is
115
128
  // the muted ink so it reads as an object on that track rather than a hole.
116
- --mat-slide-toggle-unselected-track-color: var(--fs-hairline, light-dark(#f0f0f0, rgba(255, 255, 255, 0.22)));
117
- --mat-slide-toggle-unselected-hover-track-color: var(--fs-hairline, light-dark(#f0f0f0, rgba(255, 255, 255, 0.22)));
118
- --mat-slide-toggle-unselected-focus-track-color: var(--fs-hairline, light-dark(#f0f0f0, rgba(255, 255, 255, 0.22)));
119
- --mat-slide-toggle-unselected-pressed-track-color: var(--fs-hairline, light-dark(#f0f0f0, rgba(255, 255, 255, 0.22)));
120
- --mat-slide-toggle-unselected-handle-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
121
- --mat-slide-toggle-unselected-hover-handle-color: var(--fs-color-text, light-dark(rgba(0, 0, 0, 0.87), #E8EDEC));
122
- --mat-slide-toggle-unselected-focus-handle-color: var(--fs-color-text, light-dark(rgba(0, 0, 0, 0.87), #E8EDEC));
123
- --mat-slide-toggle-unselected-pressed-handle-color: var(--fs-color-text, light-dark(rgba(0, 0, 0, 0.87), #E8EDEC));
124
- --mat-slide-toggle-unselected-icon-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
129
+ --mat-slide-toggle-unselected-track-color: var(--fs-hairline, rgba(255, 255, 255, 0.22));
130
+ --mat-slide-toggle-unselected-hover-track-color: var(--fs-hairline, rgba(255, 255, 255, 0.22));
131
+ --mat-slide-toggle-unselected-focus-track-color: var(--fs-hairline, rgba(255, 255, 255, 0.22));
132
+ --mat-slide-toggle-unselected-pressed-track-color: var(--fs-hairline, rgba(255, 255, 255, 0.22));
133
+ --mat-slide-toggle-unselected-handle-color: var(--fs-color-text-muted, #97A5A6);
134
+ --mat-slide-toggle-unselected-hover-handle-color: var(--fs-color-text, #E8EDEC);
135
+ --mat-slide-toggle-unselected-focus-handle-color: var(--fs-color-text, #E8EDEC);
136
+ --mat-slide-toggle-unselected-pressed-handle-color: var(--fs-color-text, #E8EDEC);
137
+ --mat-slide-toggle-unselected-icon-color: var(--fs-surface-background, #232428);
125
138
 
126
139
  // Selected: the brand fills the track, and the handle goes to the surface
127
140
  // colour so it reads as a light knob on a coloured rail in both schemes.
@@ -129,19 +142,19 @@
129
142
  --mat-slide-toggle-selected-hover-track-color: var(--fs-color-primary, #1B474E);
130
143
  --mat-slide-toggle-selected-focus-track-color: var(--fs-color-primary, #1B474E);
131
144
  --mat-slide-toggle-selected-pressed-track-color: var(--fs-color-primary, #1B474E);
132
- --mat-slide-toggle-selected-handle-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
133
- --mat-slide-toggle-selected-hover-handle-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
134
- --mat-slide-toggle-selected-focus-handle-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
135
- --mat-slide-toggle-selected-pressed-handle-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
145
+ --mat-slide-toggle-selected-handle-color: var(--fs-surface-background, #232428);
146
+ --mat-slide-toggle-selected-hover-handle-color: var(--fs-surface-background, #232428);
147
+ --mat-slide-toggle-selected-focus-handle-color: var(--fs-surface-background, #232428);
148
+ --mat-slide-toggle-selected-pressed-handle-color: var(--fs-surface-background, #232428);
136
149
  --mat-slide-toggle-selected-icon-color: var(--fs-color-primary, #1B474E);
137
150
 
138
- --mat-slide-toggle-label-text-color: var(--fs-color-text, light-dark(rgba(0, 0, 0, 0.87), #E8EDEC));
139
- --mat-slide-toggle-disabled-label-text-color: var(--fs-color-text-faint, light-dark(rgba(0, 0, 0, 0.38), #6A7779));
140
- --mat-slide-toggle-disabled-unselected-track-outline-color: var(--fs-hairline, light-dark(#f0f0f0, rgba(255, 255, 255, 0.22)));
141
- --mat-slide-toggle-selected-focus-state-layer-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
142
- --mat-slide-toggle-selected-hover-state-layer-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
143
- --mat-slide-toggle-unselected-focus-state-layer-color: var(--fs-color-hover, light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.08)));
144
- --mat-slide-toggle-unselected-hover-state-layer-color: var(--fs-color-hover, light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.08)));
151
+ --mat-slide-toggle-label-text-color: var(--fs-color-text, #E8EDEC);
152
+ --mat-slide-toggle-disabled-label-text-color: var(--fs-color-text-faint, #6A7779);
153
+ --mat-slide-toggle-disabled-unselected-track-outline-color: var(--fs-hairline, rgba(255, 255, 255, 0.22));
154
+ --mat-slide-toggle-selected-focus-state-layer-color: var(--fs-color-selected, rgba(255, 255, 255, 0.12));
155
+ --mat-slide-toggle-selected-hover-state-layer-color: var(--fs-color-selected, rgba(255, 255, 255, 0.12));
156
+ --mat-slide-toggle-unselected-focus-state-layer-color: var(--fs-color-hover, rgba(255, 255, 255, 0.08));
157
+ --mat-slide-toggle-unselected-hover-state-layer-color: var(--fs-color-hover, rgba(255, 255, 255, 0.08));
145
158
 
146
159
  // =========================================================================
147
160
  // SLIDER
@@ -150,21 +163,21 @@
150
163
  // handle matches the active track rather than the surface - a slider's knob
151
164
  // is part of the value it is showing.
152
165
  --mat-slider-active-track-color: var(--fs-color-primary, #1B474E);
153
- --mat-slider-inactive-track-color: var(--fs-hairline-strong, light-dark(rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0.38)));
166
+ --mat-slider-inactive-track-color: var(--fs-hairline-strong, rgba(255, 255, 255, 0.38));
154
167
  --mat-slider-handle-color: var(--fs-color-primary, #1B474E);
155
168
  --mat-slider-hover-handle-color: var(--fs-color-primary, #1B474E);
156
169
  --mat-slider-focus-handle-color: var(--fs-color-primary, #1B474E);
157
- --mat-slider-disabled-active-track-color: var(--fs-hairline-strong, light-dark(rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0.38)));
158
- --mat-slider-disabled-inactive-track-color: var(--fs-hairline, light-dark(#f0f0f0, rgba(255, 255, 255, 0.22)));
159
- --mat-slider-disabled-handle-color: var(--fs-hairline-strong, light-dark(rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0.38)));
160
- --mat-slider-ripple-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
161
- --mat-slider-hover-state-layer-color: var(--fs-color-hover, light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.08)));
162
- --mat-slider-focus-state-layer-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
170
+ --mat-slider-disabled-active-track-color: var(--fs-hairline-strong, rgba(255, 255, 255, 0.38));
171
+ --mat-slider-disabled-inactive-track-color: var(--fs-hairline, rgba(255, 255, 255, 0.22));
172
+ --mat-slider-disabled-handle-color: var(--fs-hairline-strong, rgba(255, 255, 255, 0.38));
173
+ --mat-slider-ripple-color: var(--fs-color-selected, rgba(255, 255, 255, 0.12));
174
+ --mat-slider-hover-state-layer-color: var(--fs-color-hover, rgba(255, 255, 255, 0.08));
175
+ --mat-slider-focus-state-layer-color: var(--fs-color-selected, rgba(255, 255, 255, 0.12));
163
176
 
164
177
  // The value bubble is a floating surface, so it takes the RAISED surface and
165
178
  // the ink that reads on it.
166
- --mat-slider-label-container-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
167
- --mat-slider-label-label-text-color: var(--fs-color-text, light-dark(rgba(0, 0, 0, 0.87), #E8EDEC));
179
+ --mat-slider-label-container-color: var(--fs-surface-background, #232428);
180
+ --mat-slider-label-label-text-color: var(--fs-color-text, #E8EDEC);
168
181
 
169
182
  // =========================================================================
170
183
  // CHIP
@@ -172,21 +185,21 @@
172
185
  // A chip is a SURFACE with a label, not an outline with a tint, so the flat
173
186
  // (unselected) chip takes the hover wash rather than the page ground - that
174
187
  // is what separates it from whatever it sits on without a border.
175
- --mat-chip-elevated-container-color: var(--fs-color-hover, light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.08)));
176
- --mat-chip-label-text-color: var(--fs-color-text, light-dark(rgba(0, 0, 0, 0.87), #E8EDEC));
177
- --mat-chip-outline-color: var(--fs-hairline-strong, light-dark(rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0.38)));
188
+ --mat-chip-elevated-container-color: var(--fs-color-hover, rgba(255, 255, 255, 0.08));
189
+ --mat-chip-label-text-color: var(--fs-color-text, #E8EDEC);
190
+ --mat-chip-outline-color: var(--fs-hairline-strong, rgba(255, 255, 255, 0.38));
178
191
  --mat-chip-focus-outline-color: var(--fs-color-primary, #1B474E);
179
192
 
180
193
  --mat-chip-elevated-selected-container-color: var(--fs-color-primary, #1B474E);
181
- --mat-chip-selected-label-text-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
182
- --mat-chip-selected-trailing-icon-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
194
+ --mat-chip-selected-label-text-color: var(--fs-surface-background, #232428);
195
+ --mat-chip-selected-trailing-icon-color: var(--fs-surface-background, #232428);
183
196
 
184
- --mat-chip-disabled-label-text-color: var(--fs-color-text-faint, light-dark(rgba(0, 0, 0, 0.38), #6A7779));
185
- --mat-chip-disabled-outline-color: var(--fs-hairline, light-dark(#f0f0f0, rgba(255, 255, 255, 0.22)));
186
- --mat-chip-hover-state-layer-color: var(--fs-color-hover, light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.08)));
187
- --mat-chip-focus-state-layer-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
188
- --mat-chip-selected-hover-state-layer-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
189
- --mat-chip-selected-focus-state-layer-color: var(--fs-color-selected, light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12)));
197
+ --mat-chip-disabled-label-text-color: var(--fs-color-text-faint, #6A7779);
198
+ --mat-chip-disabled-outline-color: var(--fs-hairline, rgba(255, 255, 255, 0.22));
199
+ --mat-chip-hover-state-layer-color: var(--fs-color-hover, rgba(255, 255, 255, 0.08));
200
+ --mat-chip-focus-state-layer-color: var(--fs-color-selected, rgba(255, 255, 255, 0.12));
201
+ --mat-chip-selected-hover-state-layer-color: var(--fs-color-selected, rgba(255, 255, 255, 0.12));
202
+ --mat-chip-selected-focus-state-layer-color: var(--fs-color-selected, rgba(255, 255, 255, 0.12));
190
203
 
191
204
  // =========================================================================
192
205
  // PSEUDO-CHECKBOX
@@ -205,17 +218,17 @@
205
218
  // FULL is the variant that draws a box; MINIMAL draws only a checkmark with
206
219
  // no container. Both are themed: an app choosing either gets a control that
207
220
  // reads, and the two never disagree about what "selected" looks like.
208
- --mat-pseudo-checkbox-full-unselected-icon-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.54), #97A5A6));
221
+ --mat-pseudo-checkbox-full-unselected-icon-color: var(--fs-color-text-muted, #97A5A6);
209
222
  --mat-pseudo-checkbox-full-selected-icon-color: var(--fs-color-primary, #1B474E);
210
- --mat-pseudo-checkbox-full-selected-checkmark-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
223
+ --mat-pseudo-checkbox-full-selected-checkmark-color: var(--fs-surface-background, #232428);
211
224
 
212
- --mat-pseudo-checkbox-full-disabled-unselected-icon-color: var(--fs-hairline, light-dark(#f0f0f0, rgba(255, 255, 255, 0.22)));
213
- --mat-pseudo-checkbox-full-disabled-selected-icon-color: var(--fs-hairline-strong, light-dark(rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0.38)));
214
- --mat-pseudo-checkbox-full-disabled-selected-checkmark-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
225
+ --mat-pseudo-checkbox-full-disabled-unselected-icon-color: var(--fs-hairline, rgba(255, 255, 255, 0.22));
226
+ --mat-pseudo-checkbox-full-disabled-selected-icon-color: var(--fs-hairline-strong, rgba(255, 255, 255, 0.38));
227
+ --mat-pseudo-checkbox-full-disabled-selected-checkmark-color: var(--fs-surface-background, #232428);
215
228
 
216
229
  // The minimal variant has no box to fill, so the CHECKMARK carries the
217
230
  // brand rather than sitting on it - the inverse of the full variant above.
218
231
  --mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--fs-color-primary, #1B474E);
219
- --mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--fs-color-text-faint, light-dark(rgba(0, 0, 0, 0.38), #6A7779));
232
+ --mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--fs-color-text-faint, #6A7779);
220
233
  }
221
234
  }
@@ -53,10 +53,10 @@
53
53
  // pair), so nothing about the light appearance moves. Only the dark half is
54
54
  // new, and light-dark() picks between them off the `color-scheme` the host
55
55
  // declares -- no class, no input, no media query.
56
- --mdc-filled-text-field-container-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
57
- --mdc-filled-text-field-disabled-container-color: var(--fs-color-hover, light-dark(#F5F5F5, rgba(255, 255, 255, 0.08)));
58
- --mat-form-field-filled-container-color: var(--fs-surface-background, light-dark(#FFFFFF, #232428));
59
- --mat-form-field-filled-disabled-container-color: var(--fs-color-hover, light-dark(#F5F5F5, rgba(255, 255, 255, 0.08)));
56
+ --mdc-filled-text-field-container-color: var(--fs-surface-background, #232428);
57
+ --mdc-filled-text-field-disabled-container-color: var(--fs-color-hover, rgba(255, 255, 255, 0.08));
58
+ --mat-form-field-filled-container-color: var(--fs-surface-background, #232428);
59
+ --mat-form-field-filled-disabled-container-color: var(--fs-color-hover, rgba(255, 255, 255, 0.08));
60
60
 
61
61
  .mat-mdc-text-field-wrapper {
62
62
  border: 1px solid var(--mdc-outlined-text-field-outline-color, var(--mat-form-field-outlined-outline-color, rgb(127 127 127 / 38%)));
@@ -76,7 +76,7 @@
76
76
  // The last-resort fallback is a PAIR, not a flat black: this renders
77
77
  // when @firestitch/style's material layer is absent, and a black hover
78
78
  // border on a dark ground reads as a hole punched in the field.
79
- border-color: var(--mdc-outlined-text-field-hover-outline-color, var(--mat-form-field-outlined-hover-outline-color, light-dark(rgba(0, 0, 0, 0.87), #E8EDEC)));
79
+ border-color: var(--mdc-outlined-text-field-hover-outline-color, var(--mat-form-field-outlined-hover-outline-color, #E8EDEC));
80
80
  }
81
81
  }
82
82
 
@@ -109,7 +109,7 @@
109
109
  }
110
110
 
111
111
  &.mat-form-field-disabled .mat-mdc-text-field-wrapper {
112
- border-color: var(--mdc-outlined-text-field-disabled-outline-color, var(--mat-form-field-outlined-disabled-outline-color, light-dark(rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0.12))));
112
+ border-color: var(--mdc-outlined-text-field-disabled-outline-color, var(--mat-form-field-outlined-disabled-outline-color, rgba(255, 255, 255, 0.12)));
113
113
  }
114
114
  }
115
115
 
@@ -3,29 +3,59 @@
3
3
  // =============================================================================
4
4
  // The names every @firestitch package reads instead of hardcoding a hex.
5
5
  //
6
- // WHY light-dark() AND NOT A THEME CLASS. These packages have to work unchanged
7
- // in two worlds at once: legacy apps on Material 2 and new apps on Material 3.
8
- // A class-based swap would mean every host app agreeing on the same class name
9
- // and setting it; light-dark() reads the `color-scheme` property, which is the
10
- // ONE mechanism both Material versions and the browser itself already honour.
11
- // A package that reads these names needs to know nothing about its host.
6
+ // DARK IS THE BASE; LIGHT IS AN OVERRIDE. The dark values are declared plainly
7
+ // on :root, and a second block restates the light ones when the host marks
8
+ // itself light. No light-dark() in any declaration here — read on.
12
9
  //
13
- // THE HOST APP MUST DECLARE color-scheme. Without it the browser resolves every
14
- // light-dark() to its LIGHT value — the pair is not a detector, it is a picker,
15
- // and `color-scheme` is what it picks from:
10
+ // WHY NOT light-dark(), WHICH THIS FILE USED UNTIL 18.2.0. It was the right
11
+ // idea and it does not survive the build. light-dark() needs Chrome 123+, and
12
+ // a host whose browserslist still includes an older engine gets it DOWNLEVELLED
13
+ // by esbuild — flattened to its LIGHT half, unconditionally. The failure is
14
+ // silent and total: every token resolves to its light value on a dark ground,
15
+ // so a checkbox outline computes to rgba(0, 0, 0, 0.54) — black on a dark
16
+ // panel, invisible. Nothing warns, the source file looks correct, and the
17
+ // served CSS is the only place the truth shows.
16
18
  //
17
- // :root { color-scheme: dark; }
18
- // .my-light { color-scheme: light; }
19
+ // That is not a browser-support question a shared package gets to have an
20
+ // opinion about. A host app chooses its own browserslist for its own reasons,
21
+ // and a colour contract that quietly inverts on some of those choices is
22
+ // broken, not merely modern.
19
23
  //
20
- // DECLARED, NOT DETECTED. Nothing here reads prefers-color-scheme. That media
21
- // query reports the DEVICE, and an app whose user chose Light on a dark phone
22
- // would then fight its own setting. Resolving the choice is the app's job; this
23
- // file only supplies the two values it picks between.
24
+ // HOW A HOST SAYS "LIGHT". Either marker works, and an app almost certainly
25
+ // already sets one:
24
26
  //
25
- // EVERY CONSUMER KEEPS ITS OWN FALLBACK. A package reads these as
26
- // `var(--fs-hairline, light-dark(#f0f0f0, rgba(255,255,255,.22)))` so that it
27
- // still renders correctly when @firestitch/style is not installed at all. The
28
- // fallback is the contract's default restated locally — keep the two in step.
27
+ // <html class="theme-light"> or <html data-theme="light">
28
+ //
29
+ // A host that marks nothing gets the dark values. That is a deliberate default
30
+ // rather than a guess: these packages render on dark app grounds, and a dark
31
+ // token on a light page reads as heavy, while a light token on a dark page
32
+ // disappears completely. Failing toward "too strong" beats failing toward
33
+ // invisible.
34
+ //
35
+ // STILL DECLARED, NOT DETECTED. Nothing here reads prefers-color-scheme. That
36
+ // media query reports the DEVICE, and an app whose user chose Light on a dark
37
+ // phone would then fight its own setting. Resolving the choice is the app's
38
+ // job; this file supplies the values and reads the marker the app already sets.
39
+ //
40
+ // KEEP DECLARING color-scheme TOO. It is what paints the browser's own chrome —
41
+ // caret, scrollbars, autofill, native control internals — which no custom
42
+ // property can reach. It no longer drives these tokens, but it is not
43
+ // redundant.
44
+ //
45
+ // EVERY CONSUMER KEEPS ITS OWN FALLBACK, AS A PLAIN LITERAL. A package reads
46
+ // these as `var(--fs-hairline, rgba(255,255,255,.22))` so it still renders when
47
+ // @firestitch/style is not installed at all.
48
+ //
49
+ // NEVER light-dark() IN A FALLBACK. Given `var(--name, light-dark(A, B))`,
50
+ // esbuild does not just downlevel the inner function — it folds the WHOLE
51
+ // expression to the literal A and throws the var() reference away. The consumer
52
+ // then never reads the token, so correcting the token's value changes nothing
53
+ // on screen. That is why three published versions in a row fixed nothing: the
54
+ // source read correctly every time and the served CSS carried a bare
55
+ // rgba(0, 0, 0, 0.54) where a var() should have been.
56
+ //
57
+ // A fallback covers the case where this block never loaded, which is a
58
+ // single-value situation by definition. One literal, the dark one.
29
59
  //
30
60
  // These are CSS custom properties, not Sass variables, on purpose: they resolve
31
61
  // in the browser at paint time, so one declaration re-skins a whole tree
@@ -37,9 +67,9 @@
37
67
  // ===== INK =====
38
68
  // Three levels. Full-strength is for the text that matters; muted carries
39
69
  // labels and secondary copy; faint is for text that is present but quiet.
40
- --fs-color-text: light-dark(rgba(0, 0, 0, 0.87), #E8EDEC);
41
- --fs-color-text-muted: light-dark(rgba(0, 0, 0, 0.54), #97A5A6);
42
- --fs-color-text-faint: light-dark(rgba(0, 0, 0, 0.38), #6A7779);
70
+ --fs-color-text: #E8EDEC;
71
+ --fs-color-text-muted: #97A5A6;
72
+ --fs-color-text-faint: #6A7779;
43
73
 
44
74
  // ===== SURFACE =====
45
75
  // ONE surface colour for everything that is a surface: a page, a dialog, a
@@ -59,14 +89,18 @@
59
89
  // separates with a shadow, a hairline or a blur; if a genuine need for a
60
90
  // second surface colour appears later, add it then, with the case that
61
91
  // justifies it. Do not reintroduce `raised` as a default.
62
- --fs-surface-background: light-dark(#FFFFFF, #232428);
92
+ --fs-surface-background: #232428;
63
93
 
64
94
  // ===== LINES =====
65
95
  // The hairline does most of the structural work: chip outlines, dividers,
66
96
  // field borders. Deliberately low-contrast in both modes — it should read
67
97
  // as a fold in the surface, not as a drawn line.
68
- --fs-hairline: light-dark(#f0f0f0, rgba(255, 255, 255, 0.22));
69
- --fs-hairline-strong: light-dark(rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0.38));
98
+ //
99
+ // NOT FOR A CONTROL OUTLINE. An empty checkbox or radio is the control's
100
+ // whole resting state, not a fold in a surface, so it reads
101
+ // --fs-color-text-muted instead — see _form-controls.scss.
102
+ --fs-hairline: rgba(255, 255, 255, 0.22);
103
+ --fs-hairline-strong: rgba(255, 255, 255, 0.38);
70
104
 
71
105
  // ===== BRAND =====
72
106
  // The application's own colour, and the one name a package reads to render
@@ -95,7 +129,39 @@
95
129
  // hover as filter: brightness() — that DARKENS, which is right on a white
96
130
  // page and backwards on a dark one. A translucent wash reads correctly in
97
131
  // both modes because it takes its tone from whatever is behind it.
98
- --fs-color-hover: light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.08));
99
- --fs-color-selected: light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12));
132
+ --fs-color-hover: rgba(255, 255, 255, 0.08);
133
+ --fs-color-selected: rgba(255, 255, 255, 0.12);
134
+ }
135
+
136
+ // ===========================================================================
137
+ // LIGHT MODE
138
+ // ===========================================================================
139
+ // The same names restated with their light values. Custom properties inherit,
140
+ // so every consumer keeps reading one name and silently gets the right value
141
+ // — a package component never learns which mode it is in, which is the whole
142
+ // point of the contract.
143
+ //
144
+ // BOTH MARKERS, because apps already differ and neither is worth a migration:
145
+ // `.theme-light` is what the CloudCure apps set from their ThemeService,
146
+ // `[data-theme="light"]` is the broader web convention. They are listed as
147
+ // separate selectors rather than one `:is()` so the specificity stays a flat
148
+ // 0-1-0 in every engine.
149
+ //
150
+ // --fs-color-primary is absent on purpose. A brand colour is picked to work
151
+ // on its own ground and does not flip with the scheme; an app whose brand
152
+ // genuinely needs to shift maps the name to a pair of its own.
153
+ :root.theme-light,
154
+ :root[data-theme='light'] {
155
+ --fs-color-text: rgba(0, 0, 0, 0.87);
156
+ --fs-color-text-muted: rgba(0, 0, 0, 0.54);
157
+ --fs-color-text-faint: rgba(0, 0, 0, 0.38);
158
+
159
+ --fs-surface-background: #FFFFFF;
160
+
161
+ --fs-hairline: #f0f0f0;
162
+ --fs-hairline-strong: rgba(0, 0, 0, 0.38);
163
+
164
+ --fs-color-hover: rgba(0, 0, 0, 0.04);
165
+ --fs-color-selected: rgba(0, 0, 0, 0.08);
100
166
  }
101
167
  }
@@ -31,11 +31,11 @@
31
31
  // its current light value as the light half, so nothing about the light
32
32
  // appearance changes; only the dark half is new.
33
33
  --mdc-outlined-text-field-outline-color: rgb(127 127 127 / 38%);
34
- --mdc-outlined-text-field-hover-outline-color: var(--fs-color-text, light-dark(rgba(0, 0, 0, 0.87), #E8EDEC));
35
- --mdc-outlined-text-field-input-text-placeholder-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.6), #97A5A6));
36
- --mdc-filled-text-field-input-text-placeholder-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.6), #97A5A6));
37
- --mdc-outlined-text-field-hover-label-text-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.6), #97A5A6));
38
- --mdc-filled-text-field-hover-label-text-color: var(--fs-color-text-muted, light-dark(rgba(0, 0, 0, 0.6), #97A5A6));
34
+ --mdc-outlined-text-field-hover-outline-color: var(--fs-color-text, #E8EDEC);
35
+ --mdc-outlined-text-field-input-text-placeholder-color: var(--fs-color-text-muted, #97A5A6);
36
+ --mdc-filled-text-field-input-text-placeholder-color: var(--fs-color-text-muted, #97A5A6);
37
+ --mdc-outlined-text-field-hover-label-text-color: var(--fs-color-text-muted, #97A5A6);
38
+ --mdc-filled-text-field-hover-label-text-color: var(--fs-color-text-muted, #97A5A6);
39
39
 
40
40
  /*
41
41
  * Buttons < Angular 20