@stnd/styles 0.7.4 → 0.7.6
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/CHANGELOG.md +12 -0
- package/_standard-11-forms.scss +20 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/_standard-11-forms.scss
CHANGED
|
@@ -269,11 +269,19 @@ input[type="checkbox"][role="switch"] {
|
|
|
269
269
|
border: none;
|
|
270
270
|
cursor: pointer;
|
|
271
271
|
background: var(--color-surface-lowest);
|
|
272
|
-
|
|
272
|
+
/* --shadow-inset (not just the thumb's own shadow, fixed two commits ago)
|
|
273
|
+
is ALSO asymmetric: inset 0 1px 3px (a dark inset shadow pooling near
|
|
274
|
+
the TOP-inner edge) plus inset 0 -1px 0 0 (a bright highlight line just
|
|
275
|
+
inside the BOTTOM edge). On a thumb sized to exactly fill this track,
|
|
276
|
+
that bottom highlight brightens a sliver of the track color right where
|
|
277
|
+
the thumb's bottom edge sits, reading as the track's own color (accent
|
|
278
|
+
orange, once checked) peeking out underneath — which is exactly what it
|
|
279
|
+
is. --shadow-ring alone is symmetric on all four sides. */
|
|
280
|
+
box-shadow: var(--shadow-ring);
|
|
273
281
|
transition: background 0.2s;
|
|
274
282
|
|
|
275
283
|
&:hover {
|
|
276
|
-
box-shadow: var(--shadow-ring)
|
|
284
|
+
box-shadow: var(--shadow-ring);
|
|
277
285
|
&::before {
|
|
278
286
|
background: var(--color-accent);
|
|
279
287
|
}
|
|
@@ -299,7 +307,16 @@ input[type="checkbox"][role="switch"] {
|
|
|
299
307
|
height: calc(var(--switch-height) - var(--switch-padding) * 2);
|
|
300
308
|
border-radius: 50%;
|
|
301
309
|
background: var(--color-surface-high);
|
|
302
|
-
|
|
310
|
+
/* Not --shadow-raised here on purpose — its ambient component
|
|
311
|
+
(--shadow-ambient: 0 1px 1px) is a fixed 1px DOWNWARD drop shadow,
|
|
312
|
+
tuned to be a subtle depth cue on normal-sized raised elements. On a
|
|
313
|
+
thumb sized to exactly fill its track (padding 0, see above) that
|
|
314
|
+
same 1px shows up as a real, asymmetric gap: a crisp bright edge at
|
|
315
|
+
the top (the inset highlight) against a soft shadow-blurred one at
|
|
316
|
+
the bottom, which reads as "not touching" the track's bottom edge
|
|
317
|
+
even though the circle's true box does. Border ring only — no
|
|
318
|
+
directional shadow to be asymmetric in the first place. */
|
|
319
|
+
box-shadow: inset 0 1px 0 0 var(--color-highlight), 0 0 0 1px var(--color-border);
|
|
303
320
|
transition: all var(--transition-fast);
|
|
304
321
|
}
|
|
305
322
|
|