@kolkrabbi/kol-theme 0.51.0 → 0.52.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.
@@ -17,7 +17,13 @@
17
17
  * Dark selector matches brand's mechanism: [data-theme="dark"], .dark.
18
18
  */
19
19
 
20
- :root {
20
+ /* LIGHT is declared on the theme selectors too, not `:root` alone (0.52.0,
21
+ * nested-theme-scope): a `data-theme="light"` / `.light` SUBTREE inside a dark
22
+ * app must carry the light surfaces on its own element, or it inherits the
23
+ * root's dark values. `:root` still matches, so root-level theming and the
24
+ * system-follow mirror below are untouched. */
25
+ :root,
26
+ :is([data-theme="light"], .light) {
21
27
  /* Absolutes (theme-invariant) */
22
28
  --kol-color-absolute-white: #ffffff;
23
29
  --kol-color-absolute-black: #000000;
package/kol-color.css CHANGED
@@ -89,8 +89,6 @@
89
89
  * BORDER
90
90
  * --------------------------------------------------------------------------- */
91
91
 
92
- --kol-border-default: color-mix(in srgb, var(--kol-surface-on-primary) 8%, transparent);
93
- --kol-border-focus: color-mix(in srgb, var(--kol-accent-primary) 70%, var(--kol-surface-on-primary));
94
92
  --kol-focus-ring: var(--kol-accent-primary);
95
93
  /* The QUIET ring — 1px, inset, for dense rows where the loud ring's 2px
96
94
  * offset would bloom over its neighbours (nav rail leaves today).
@@ -105,6 +103,21 @@
105
103
  * Default is --kol-fg-32, exactly what the rails already drew, so minting
106
104
  * this changes NOTHING visually. Both rings are white (--kol-accent-primary
107
105
  * resolves to --kol-surface-on-primary); the two differ in weight, not hue. */
106
+ }
107
+
108
+ /* SURFACE-DERIVED chrome tokens live on the THEME selectors, not `:root` alone
109
+ * (0.52.0, nested-theme-scope) — same reason as the fg ramp in kol-opacity.css:
110
+ * a var() resolves where the property is declared, so a themed SUBTREE that
111
+ * flips --kol-surface-on-primary kept the root's border colour (a white 8%
112
+ * hairline on white paper). The accent family stays in the :root block above
113
+ * on purpose: kol-brand-color.css rebinds it at :root only, and a themed
114
+ * re-declaration here would hand a branded app's nested pane the neutral
115
+ * ink accent instead of the brand. */
116
+ :root,
117
+ :is([data-theme="light"], .light),
118
+ :is([data-theme="dark"], .dark) {
119
+ --kol-border-default: color-mix(in srgb, var(--kol-surface-on-primary) 8%, transparent);
120
+ --kol-border-focus: color-mix(in srgb, var(--kol-accent-primary) 70%, var(--kol-surface-on-primary));
108
121
  --kol-focus-ring-quiet: var(--kol-fg-32);
109
122
  }
110
123
 
@@ -693,7 +693,6 @@
693
693
  * .kol-sidenav-hop-label label slot — collapses to display:none in
694
694
  * rail mode (responsive cascade in framework.css)
695
695
  * .kol-sidenav-link nav link with active-dot indicator
696
- * .kol-sidenav-group small vertical wrapper
697
696
  *
698
697
  * Layout/sizing/responsive collapse rules stay in kol-framework.css
699
698
  * (they're page-grid concerns, not component chrome).
@@ -727,9 +726,11 @@
727
726
  color: var(--kol-accent-primary);
728
727
  }
729
728
 
730
- .kol-sidenav-group {
731
- padding: 4px 0 4px;
732
- }
729
+ /* .kol-sidenav-group — RETIRED here 0.52.1 (sidenav-nested-groups): the
730
+ * elder's `padding: 4px 0` wrapper, dead since the 2026-08-09 port dropped
731
+ * group rendering. The group's box now lives in kol-framework.css beside the
732
+ * hop and list rules; a consumer that nests the framework import under the
733
+ * theme's layer (the showcase does) had this rule outranking that one. */
733
734
 
734
735
  /* The rail leaf had NO focus treatment at all (ThreeColumnEditorShell §3,
735
736
  * kol-fxr 2026-08-15) — only .is-active and its dot — so it fell through to
package/kol-opacity.css CHANGED
@@ -25,7 +25,16 @@
25
25
  * alias over one fg-* stop. `default` is a deprecated alias of `body`.
26
26
  */
27
27
 
28
- :root {
28
+ /* Declared on the THEME selectors, not `:root` alone (0.52.0, nested-theme-
29
+ * scope). A custom property resolves its var() where it is DECLARED and
30
+ * descendants inherit the frozen result — a ramp declared only on :root bakes
31
+ * the root's ink, so a subtree that flips --kol-surface-on-primary
32
+ * (data-theme / .light / .dark on a div) kept the root's --kol-fg-*.
33
+ * Re-declaring on the theme selectors re-resolves the ramp on the themed
34
+ * element itself — the mechanism .bg-surface-inverse already uses. */
35
+ :root,
36
+ :is([data-theme="light"], .light),
37
+ :is([data-theme="dark"], .dark) {
29
38
  /* ============================================================================
30
39
  * TOKENS — Standard tier (foreground on primary surface)
31
40
  * ============================================================================ */
@@ -374,7 +383,11 @@
374
383
  * descriptors are aliases, never their own colour values.
375
384
  * ============================================================================== */
376
385
 
377
- :root {
386
+ /* Theme selectors, same reason as the ramp above — the roles chain through
387
+ * fg-* and freeze the same way. */
388
+ :root,
389
+ :is([data-theme="light"], .light),
390
+ :is([data-theme="dark"], .dark) {
378
391
  --kol-fg-subtle: var(--kol-fg-24);
379
392
  --kol-fg-meta: var(--kol-fg-48);
380
393
  --kol-fg-body: var(--kol-fg-64);
package/kol-opaque.css CHANGED
@@ -13,7 +13,9 @@
13
13
  * transparency, it is a baked grey.
14
14
  *
15
15
  * Auto-themes for free: --kol-surface-on-primary and --kol-surface-primary both
16
- * flip in dark mode, so color-mix recomputes. No hardcoded light/dark blocks.
16
+ * flip in dark mode, so color-mix recomputes. No hardcoded light/dark blocks
17
+ * but the block is declared on the theme selectors, not `:root` alone (0.52.0,
18
+ * nested-theme-scope), so a themed SUBTREE recomputes too; see kol-opacity.css.
17
19
  *
18
20
  * Scale: 01, 02, 04, 08, 12, 16, 24, 32, 40, 48, 64, 80, 88, 96 (14 stops)
19
21
  *
@@ -26,7 +28,9 @@
26
28
  * - Classes (.bg-oq-*, .text-oq-*, .border-oq-* + inverse + hover) for JSX
27
29
  */
28
30
 
29
- :root {
31
+ :root,
32
+ :is([data-theme="light"], .light),
33
+ :is([data-theme="dark"], .dark) {
30
34
  /* ============================================================================
31
35
  * TOKENS — Standard tier (ink-on-primary, flattened onto primary surface)
32
36
  * ============================================================================ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-theme",
3
- "version": "0.51.0",
3
+ "version": "0.52.1",
4
4
  "description": "KOL (Kolkrabbi) design-system tokens + base CSS — brand-neutral. The canonical token/cascade layer every other KOL package and consumer builds on.",
5
5
  "license": "MIT",
6
6
  "type": "module",