@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 +1 -1
- package/styles/_form-controls.scss +86 -73
- package/styles/_form-field.scss +6 -6
- package/styles/_tokens.scss +93 -27
- package/styles/material.scss +5 -5
package/package.json
CHANGED
|
@@ -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
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
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,
|
|
64
|
-
--mat-checkbox-unselected-hover-icon-color: var(--fs-color-text-muted,
|
|
65
|
-
--mat-checkbox-unselected-focus-icon-color: var(--fs-color-text-muted,
|
|
66
|
-
--mat-checkbox-unselected-pressed-icon-color: var(--fs-color-text-muted,
|
|
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,
|
|
87
|
+
--mat-checkbox-selected-checkmark-color: var(--fs-surface-background, #232428);
|
|
75
88
|
|
|
76
|
-
--mat-checkbox-label-text-color: var(--fs-color-text,
|
|
77
|
-
--mat-checkbox-disabled-label-color: var(--fs-color-text-faint,
|
|
78
|
-
--mat-checkbox-disabled-unselected-icon-color: var(--fs-hairline,
|
|
79
|
-
--mat-checkbox-disabled-selected-icon-color: var(--fs-hairline-strong,
|
|
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,
|
|
84
|
-
--mat-checkbox-unselected-pressed-state-layer-color: var(--fs-color-hover,
|
|
85
|
-
--mat-checkbox-selected-hover-state-layer-color: var(--fs-color-selected,
|
|
86
|
-
--mat-checkbox-selected-pressed-state-layer-color: var(--fs-color-selected,
|
|
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,
|
|
94
|
-
--mat-radio-unselected-hover-icon-color: var(--fs-color-text-muted,
|
|
95
|
-
--mat-radio-unselected-focus-icon-color: var(--fs-color-text-muted,
|
|
96
|
-
--mat-radio-unselected-pressed-icon-color: var(--fs-color-text-muted,
|
|
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,
|
|
104
|
-
--mat-radio-disabled-label-color: var(--fs-color-text-faint,
|
|
105
|
-
--mat-radio-disabled-unselected-icon-color: var(--fs-hairline,
|
|
106
|
-
--mat-radio-disabled-selected-icon-color: var(--fs-hairline-strong,
|
|
107
|
-
--mat-radio-ripple-color: var(--fs-color-hover,
|
|
108
|
-
--mat-radio-checked-ripple-color: var(--fs-color-selected,
|
|
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,
|
|
117
|
-
--mat-slide-toggle-unselected-hover-track-color: var(--fs-hairline,
|
|
118
|
-
--mat-slide-toggle-unselected-focus-track-color: var(--fs-hairline,
|
|
119
|
-
--mat-slide-toggle-unselected-pressed-track-color: var(--fs-hairline,
|
|
120
|
-
--mat-slide-toggle-unselected-handle-color: var(--fs-color-text-muted,
|
|
121
|
-
--mat-slide-toggle-unselected-hover-handle-color: var(--fs-color-text,
|
|
122
|
-
--mat-slide-toggle-unselected-focus-handle-color: var(--fs-color-text,
|
|
123
|
-
--mat-slide-toggle-unselected-pressed-handle-color: var(--fs-color-text,
|
|
124
|
-
--mat-slide-toggle-unselected-icon-color: var(--fs-surface-background,
|
|
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,
|
|
133
|
-
--mat-slide-toggle-selected-hover-handle-color: var(--fs-surface-background,
|
|
134
|
-
--mat-slide-toggle-selected-focus-handle-color: var(--fs-surface-background,
|
|
135
|
-
--mat-slide-toggle-selected-pressed-handle-color: var(--fs-surface-background,
|
|
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,
|
|
139
|
-
--mat-slide-toggle-disabled-label-text-color: var(--fs-color-text-faint,
|
|
140
|
-
--mat-slide-toggle-disabled-unselected-track-outline-color: var(--fs-hairline,
|
|
141
|
-
--mat-slide-toggle-selected-focus-state-layer-color: var(--fs-color-selected,
|
|
142
|
-
--mat-slide-toggle-selected-hover-state-layer-color: var(--fs-color-selected,
|
|
143
|
-
--mat-slide-toggle-unselected-focus-state-layer-color: var(--fs-color-hover,
|
|
144
|
-
--mat-slide-toggle-unselected-hover-state-layer-color: var(--fs-color-hover,
|
|
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,
|
|
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,
|
|
158
|
-
--mat-slider-disabled-inactive-track-color: var(--fs-hairline,
|
|
159
|
-
--mat-slider-disabled-handle-color: var(--fs-hairline-strong,
|
|
160
|
-
--mat-slider-ripple-color: var(--fs-color-selected,
|
|
161
|
-
--mat-slider-hover-state-layer-color: var(--fs-color-hover,
|
|
162
|
-
--mat-slider-focus-state-layer-color: var(--fs-color-selected,
|
|
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,
|
|
167
|
-
--mat-slider-label-label-text-color: var(--fs-color-text,
|
|
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,
|
|
176
|
-
--mat-chip-label-text-color: var(--fs-color-text,
|
|
177
|
-
--mat-chip-outline-color: var(--fs-hairline-strong,
|
|
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,
|
|
182
|
-
--mat-chip-selected-trailing-icon-color: var(--fs-surface-background,
|
|
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,
|
|
185
|
-
--mat-chip-disabled-outline-color: var(--fs-hairline,
|
|
186
|
-
--mat-chip-hover-state-layer-color: var(--fs-color-hover,
|
|
187
|
-
--mat-chip-focus-state-layer-color: var(--fs-color-selected,
|
|
188
|
-
--mat-chip-selected-hover-state-layer-color: var(--fs-color-selected,
|
|
189
|
-
--mat-chip-selected-focus-state-layer-color: var(--fs-color-selected,
|
|
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,
|
|
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,
|
|
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,
|
|
213
|
-
--mat-pseudo-checkbox-full-disabled-selected-icon-color: var(--fs-hairline-strong,
|
|
214
|
-
--mat-pseudo-checkbox-full-disabled-selected-checkmark-color: var(--fs-surface-background,
|
|
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,
|
|
232
|
+
--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--fs-color-text-faint, #6A7779);
|
|
220
233
|
}
|
|
221
234
|
}
|
package/styles/_form-field.scss
CHANGED
|
@@ -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,
|
|
57
|
-
--mdc-filled-text-field-disabled-container-color: var(--fs-color-hover,
|
|
58
|
-
--mat-form-field-filled-container-color: var(--fs-surface-background,
|
|
59
|
-
--mat-form-field-filled-disabled-container-color: var(--fs-color-hover,
|
|
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,
|
|
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,
|
|
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
|
|
package/styles/_tokens.scss
CHANGED
|
@@ -3,29 +3,59 @@
|
|
|
3
3
|
// =============================================================================
|
|
4
4
|
// The names every @firestitch package reads instead of hardcoding a hex.
|
|
5
5
|
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
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
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
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
|
-
//
|
|
18
|
-
//
|
|
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
|
-
//
|
|
21
|
-
//
|
|
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
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
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:
|
|
41
|
-
--fs-color-text-muted:
|
|
42
|
-
--fs-color-text-faint:
|
|
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:
|
|
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
|
-
|
|
69
|
-
|
|
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:
|
|
99
|
-
--fs-color-selected:
|
|
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
|
}
|
package/styles/material.scss
CHANGED
|
@@ -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,
|
|
35
|
-
--mdc-outlined-text-field-input-text-placeholder-color: var(--fs-color-text-muted,
|
|
36
|
-
--mdc-filled-text-field-input-text-placeholder-color: var(--fs-color-text-muted,
|
|
37
|
-
--mdc-outlined-text-field-hover-label-text-color: var(--fs-color-text-muted,
|
|
38
|
-
--mdc-filled-text-field-hover-label-text-color: var(--fs-color-text-muted,
|
|
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
|