@firestitch/style 18.2.1 → 18.3.0

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.2.1",
3
+ "version": "18.3.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Firestitch/ngx-style"
@@ -231,4 +231,33 @@
231
231
  --mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--fs-color-primary, #1B474E);
232
232
  --mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--fs-color-text-faint, #6A7779);
233
233
  }
234
+
235
+ // ===========================================================================
236
+ // THE EMPTY BOX'S INTERIOR
237
+ // ===========================================================================
238
+ // The one thing in this file that is a RULE rather than a token, because
239
+ // Material offers no token for it. An unchecked checkbox is a transparent
240
+ // square with a border, so on a dark ground its interior is the dark ground -
241
+ // a black hole with a grey edge. --fs-control-fill paints it as paper.
242
+ //
243
+ // BOTH CONTROLS TOGETHER, which is the whole point of this file. A
244
+ // <mat-checkbox> on a page and the tick inside a <mat-select [multiple]> are
245
+ // different components with different class names, and a rule written for one
246
+ // is the reason they drift apart. They are listed here as one selector so
247
+ // they cannot.
248
+ //
249
+ // UNCHECKED ONLY. The checked state is already a filled brand box painted by
250
+ // the tokens above; filling it again from here would paint over the brand.
251
+ // For mdc-checkbox that is :not(...__checkmark)-free - Material swaps the
252
+ // background element's own border/background tokens on check, so the
253
+ // selector is scoped by the checked class on the host instead.
254
+ //
255
+ // NOT !important, and it must not become !important: these land at 0-1-0 and
256
+ // 0-2-0 against Material's own rules in the same sheet, and an app that
257
+ // genuinely wants a different control fill sets --fs-control-fill rather than
258
+ // fighting a weaponised selector.
259
+ .mat-mdc-checkbox:not(.mat-mdc-checkbox-checked) .mdc-checkbox__background,
260
+ .mat-pseudo-checkbox-full:not(.mat-pseudo-checkbox-checked):not(.mat-pseudo-checkbox-indeterminate) {
261
+ background-color: var(--fs-control-fill, #FFFFFF);
262
+ }
234
263
  }
@@ -131,6 +131,26 @@
131
131
  // both modes because it takes its tone from whatever is behind it.
132
132
  --fs-color-hover: rgba(255, 255, 255, 0.08);
133
133
  --fs-color-selected: rgba(255, 255, 255, 0.12);
134
+
135
+ // ===== CONTROL FILL =====
136
+ // The INSIDE of an empty checkbox, radio or multi-select tick.
137
+ //
138
+ // MATERIAL HAS NO TOKEN FOR THIS. The whole --mat-checkbox-* family is 33
139
+ // names and every one is an icon colour, a checkmark, a label, a state
140
+ // layer or a size — there is no container-color. An unchecked box is drawn
141
+ // as a transparent square with a border, so on a dark ground the interior
142
+ // is whatever is behind it: on a dark select panel it reads as a black
143
+ // hole with a grey edge. That is Material's intent and it is wrong here.
144
+ //
145
+ // NEAR-WHITE IN BOTH SCHEMES, deliberately, and this is the one token that
146
+ // does not flip. An empty checkbox should read as paper you are about to
147
+ // mark — that is the affordance, and it is the same affordance on a dark
148
+ // page as on a light one. In light mode it sits on a white surface and
149
+ // disappears behind its own outline, which is exactly how a checkbox looks
150
+ // on a light page, so the single value is correct in both.
151
+ //
152
+ // Consumed by _form-controls.scss, which is the only place that paints it.
153
+ --fs-control-fill: #FFFFFF;
134
154
  }
135
155
 
136
156
  // ===========================================================================