@stnd/styles 0.7.3 → 0.7.5

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @stnd/styles
2
2
 
3
+ ## 0.7.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-bumped @stnd/styles due to modified code.
8
+
9
+ ## 0.7.4
10
+
11
+ ### Patch Changes
12
+
13
+ - Auto-bumped @stnd/styles due to modified code.
14
+
3
15
  ## 0.7.3
4
16
 
5
17
  ### Patch Changes
@@ -253,11 +253,11 @@ input[type="checkbox"][role="switch"] {
253
253
  (an 8px thumb inset by 2px on each side), but any consumer overriding
254
254
  --switch-height alone (a smaller, denser control panel, say) kept that
255
255
  same fixed inset and ended up with a visibly undersized thumb, since
256
- the padding never scaled down with it. A ratio of the height reproduces
257
- roughly that look at the default size while actually scaling — /14
258
- (Francis, iterating live: the thumb should fill the track more, not
259
- leave a ring of bare track color showing around it). */
260
- --switch-padding: calc(var(--switch-height) / 14);
256
+ the padding never scaled down with it. Went to 0 (Francis, iterating
257
+ live: the thumb should fill the track, full height, no ring of bare
258
+ track color around it) — the thumb's own diameter now equals the
259
+ track's height exactly. */
260
+ --switch-padding: 0px;
261
261
 
262
262
  appearance: none;
263
263
  box-sizing: border-box; /* Reset content-box from base checkbox rule */
@@ -299,7 +299,16 @@ input[type="checkbox"][role="switch"] {
299
299
  height: calc(var(--switch-height) - var(--switch-padding) * 2);
300
300
  border-radius: 50%;
301
301
  background: var(--color-surface-high);
302
- box-shadow: var(--shadow-raised);
302
+ /* Not --shadow-raised here on purpose — its ambient component
303
+ (--shadow-ambient: 0 1px 1px) is a fixed 1px DOWNWARD drop shadow,
304
+ tuned to be a subtle depth cue on normal-sized raised elements. On a
305
+ thumb sized to exactly fill its track (padding 0, see above) that
306
+ same 1px shows up as a real, asymmetric gap: a crisp bright edge at
307
+ the top (the inset highlight) against a soft shadow-blurred one at
308
+ the bottom, which reads as "not touching" the track's bottom edge
309
+ even though the circle's true box does. Border ring only — no
310
+ directional shadow to be asymmetric in the first place. */
311
+ box-shadow: inset 0 1px 0 0 var(--color-highlight), 0 0 0 1px var(--color-border);
303
312
  transition: all var(--transition-fast);
304
313
  }
305
314
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stnd/styles",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "type": "module",
5
5
  "author": "Francis Fontaine",
6
6
  "license": "MIT",