@kanzo-tech/theme 0.15.0 → 0.15.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/README.md +18 -15
- package/package.json +1 -1
- package/themes/bank-dark.css +2 -4
- package/themes/bank-private-dark.css +2 -4
- package/themes/bank-private.css +2 -4
- package/themes/bank.css +2 -4
- package/themes/catppuccin-latte-dark.css +2 -4
- package/themes/catppuccin-latte.css +2 -4
- package/themes/catppuccin-mocha-dark.css +2 -4
- package/themes/catppuccin-mocha.css +2 -4
- package/themes/dracula-dark.css +2 -4
- package/themes/dracula.css +2 -4
- package/themes/kanzo-dark.css +2 -4
- package/themes/kanzo.css +5 -8
- package/themes/monochrome-dark.css +2 -4
- package/themes/monochrome.css +2 -4
- package/themes/nord-dark.css +2 -4
- package/themes/nord.css +2 -4
package/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
# @kanzo-tech/theme
|
|
2
2
|
|
|
3
|
-
The
|
|
4
|
-
|
|
3
|
+
The themes and the axes a user layers over them. **A theme is one flat block of CSS, and it carries
|
|
4
|
+
one mode.**
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
The themes in `themes/` are **provisional test themes** — sixteen written here to exercise the
|
|
7
|
+
vocabulary and thirteen imported from daisyUI — that the guards measure. They are not a curated set;
|
|
8
|
+
names, values and the count will change, and a product ships its own.
|
|
9
|
+
|
|
10
|
+
- **Theme** — `packages/theme/themes/<name>.css`, hand-written source. Its colours, the shape knobs,
|
|
11
|
+
optionally its font stacks, and its own `color-scheme`. Selected with `data-theme`.
|
|
8
12
|
- **Radius** — `none` · `xs` · `sm` · `md` · `lg`, a user preference over the theme's own three
|
|
9
13
|
radius knobs.
|
|
10
14
|
- **Font** / **Mono font** — `--font-sans` / `--font-heading` / `--font-mono`.
|
|
@@ -22,7 +26,7 @@ types.
|
|
|
22
26
|
color-scheme: light;
|
|
23
27
|
--background: #fbfcfd; --foreground: #10151c;
|
|
24
28
|
--primary: #1f6feb; --primary-foreground: #ffffff;
|
|
25
|
-
/* …
|
|
29
|
+
/* …the rest of the colours, then the rest of the shape knobs… */
|
|
26
30
|
--radius-box: 0.75rem; --radius-field: 0.5rem; --radius-selector: 0.25rem;
|
|
27
31
|
--stroke: 1px; --relief: 0;
|
|
28
32
|
}
|
|
@@ -39,11 +43,10 @@ declared in `:root` would inherit already substituted.
|
|
|
39
43
|
**Light and dark are two themes.** There is no second block and no `.dark` that flips a token; the
|
|
40
44
|
class survives only as the selector for the `dark:` variant at the call sites that still ask for one.
|
|
41
45
|
|
|
42
|
-
**There is no derivation.** A
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
catches a mistake.
|
|
46
|
+
**There is no derivation and there are no step tokens.** A tint is a percentage on the role,
|
|
47
|
+
computed where it is used — `bg-destructive/7`, or `color-mix(in oklab, var(--destructive) 7%,
|
|
48
|
+
transparent)` where no utility reaches. The author answers for AA, and guards over the shipped themes
|
|
49
|
+
are what catch a mistake.
|
|
47
50
|
|
|
48
51
|
## How the other axes work
|
|
49
52
|
|
|
@@ -52,7 +55,7 @@ Every axis is a `data-*` attribute **on `<html>`**, and the token values behind
|
|
|
52
55
|
|
|
53
56
|
| Axis | Attribute | Sets |
|
|
54
57
|
|---|---|---|
|
|
55
|
-
| radius | `data-radius` | `--radius` |
|
|
58
|
+
| radius | `data-radius` | `--radius-box` / `--radius-field` / `--radius-selector` |
|
|
56
59
|
| font | `data-font` | `--font-sans` |
|
|
57
60
|
| monoFont | `data-mono-font` | `--font-mono` |
|
|
58
61
|
| density | `data-font-size` | the root font-size |
|
|
@@ -77,8 +80,9 @@ Read or change the live preferences with `useKanzoTheme()`, or drop in the ready
|
|
|
77
80
|
|
|
78
81
|
## Dark mode
|
|
79
82
|
|
|
80
|
-
Not owned here.
|
|
81
|
-
|
|
83
|
+
Not owned here. `.dark` on `<html>` says which side is worn: the provider writes the theme chosen for
|
|
84
|
+
that side to `data-theme`, and the `dark:` variant keys off the class. If you already run a theme
|
|
85
|
+
manager, hand it to the provider:
|
|
82
86
|
|
|
83
87
|
```tsx
|
|
84
88
|
import { useTheme } from "next-themes";
|
|
@@ -125,5 +129,4 @@ fails on one that declares a partial set.
|
|
|
125
129
|
`pnpm gen` runs it; CI regenerates and fails on any diff.
|
|
126
130
|
|
|
127
131
|
**`tokens.css` and `themes/*.css` are NOT generated.** They are hand-written source, and a guard that
|
|
128
|
-
regenerated them would have nothing to regenerate them from.
|
|
129
|
-
colour stopped being output.
|
|
132
|
+
regenerated them would have nothing to regenerate them from.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanzo-tech/theme",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Kanzo design tokens — a catalogue of themes, each one flat block of CSS, plus the non-colour axes (radius / font / mono font / density) a user layers over them, driven by data-* attributes on <html>.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/themes/bank-dark.css
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* bank-dark — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* bank-dark — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="bank-dark"] {
|
|
5
3
|
color-scheme: dark;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #31353b;
|
|
26
24
|
--ring: #3065b9;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--popover: #121417;
|
|
30
28
|
--input: #6b7280;
|
|
31
29
|
--field: #090a0c;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* bank-private-dark — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* bank-private-dark — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="bank-private-dark"] {
|
|
5
3
|
color-scheme: dark;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #31353b;
|
|
26
24
|
--ring: #a16207;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--popover: #121417;
|
|
30
28
|
--input: #6b7280;
|
|
31
29
|
--field: #090a0c;
|
package/themes/bank-private.css
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* bank-private — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* bank-private — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="bank-private"] {
|
|
5
3
|
color-scheme: light;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #c4c8d0;
|
|
26
24
|
--ring: #a16207;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--input: #6b7280;
|
|
30
28
|
--field: #00000008;
|
|
31
29
|
--faint: #636977;
|
package/themes/bank.css
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* bank — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* bank — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="bank"] {
|
|
5
3
|
color-scheme: light;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #c4c8d0;
|
|
26
24
|
--ring: #2b7fff;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--input: #6b7280;
|
|
30
28
|
--field: #00000008;
|
|
31
29
|
--faint: #636977;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* catppuccin-latte-dark — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* catppuccin-latte-dark — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="catppuccin-latte-dark"] {
|
|
5
3
|
color-scheme: dark;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #404249;
|
|
26
24
|
--ring: #8839ef;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--popover: #16171a;
|
|
30
28
|
--input: #70737d;
|
|
31
29
|
--field: #0a0a0c;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* catppuccin-latte — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* catppuccin-latte — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="catppuccin-latte"] {
|
|
5
3
|
color-scheme: light;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #d2d4dc;
|
|
26
24
|
--ring: #a578fa;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--input: #8d91a1;
|
|
30
28
|
--field: #00000005;
|
|
31
29
|
--faint: #505360;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* catppuccin-mocha-dark — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* catppuccin-mocha-dark — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="catppuccin-mocha-dark"] {
|
|
5
3
|
color-scheme: dark;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #32343e;
|
|
26
24
|
--ring: #7e679a;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--popover: #131419;
|
|
30
28
|
--input: #6c7086;
|
|
31
29
|
--field: #0a0a0c;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* catppuccin-mocha — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* catppuccin-mocha — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="catppuccin-mocha"] {
|
|
5
3
|
color-scheme: light;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #c5c7d3;
|
|
26
24
|
--ring: #a681d0;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--input: #6c7086;
|
|
30
28
|
--field: #00001c08;
|
|
31
29
|
--faint: #64677d;
|
package/themes/dracula-dark.css
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* dracula-dark — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* dracula-dark — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="dracula-dark"] {
|
|
5
3
|
color-scheme: dark;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #2d354c;
|
|
26
24
|
--ring: #a75182;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--popover: #10141f;
|
|
30
28
|
--input: #6272a4;
|
|
31
29
|
--field: #090a0e;
|
package/themes/dracula.css
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* dracula — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* dracula — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="dracula"] {
|
|
5
3
|
color-scheme: light;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #bfc9e3;
|
|
26
24
|
--ring: #e562af;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--input: #6272a4;
|
|
30
28
|
--field: #0000df09;
|
|
31
29
|
--faint: #5a699a;
|
package/themes/kanzo-dark.css
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* kanzo-dark — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* kanzo-dark — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
/* `:root.dark:not([data-theme])` for the same reason kanzo.css claims the bare unattributed
|
|
5
3
|
document, and for the half that file could not cover: a first-time visitor with the OS in dark
|
|
6
4
|
has an empty `localStorage`, so `themeByAppearance` resolves to its `""` default and no
|
|
@@ -34,7 +32,7 @@
|
|
|
34
32
|
--border: #353535;
|
|
35
33
|
--ring: #737373;
|
|
36
34
|
|
|
37
|
-
/*
|
|
35
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
38
36
|
--popover: #141414;
|
|
39
37
|
--input: #737373;
|
|
40
38
|
--field: #0a0a0a;
|
package/themes/kanzo.css
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
/* kanzo — a theme is one mode, one flat block
|
|
1
|
+
/* kanzo — a theme is one mode, one flat block, written by hand.
|
|
2
2
|
|
|
3
3
|
`:root:not([data-theme])` and NOT a bare `:root`: this is the default theme, so it binds to the
|
|
4
4
|
document that has not chosen one. A bare `:root` has the same specificity as `[data-theme="x"]`,
|
|
5
|
-
which makes source order the tie-breaker
|
|
6
|
-
`:root` here
|
|
7
|
-
|
|
8
|
-
cannot outrank a chosen one".
|
|
9
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
10
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
5
|
+
which makes source order the tie-breaker, and `themes.css` imports alphabetically, so a bare
|
|
6
|
+
`:root` here would repaint every theme sorting before "kanzo.css" with kanzo's colours. See
|
|
7
|
+
`themes.test.ts`, "binds the default theme so it cannot outrank a chosen one". */
|
|
11
8
|
:root:not([data-theme]), [data-theme="kanzo"] {
|
|
12
9
|
color-scheme: light;
|
|
13
10
|
|
|
@@ -32,7 +29,7 @@
|
|
|
32
29
|
--border: #c9c9c9;
|
|
33
30
|
--ring: #737373;
|
|
34
31
|
|
|
35
|
-
/*
|
|
32
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
36
33
|
--input: #737373;
|
|
37
34
|
--field: #00000008;
|
|
38
35
|
--faint: #6a6a6a;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* monochrome-dark — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* monochrome-dark — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="monochrome-dark"] {
|
|
5
3
|
color-scheme: dark;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #353535;
|
|
26
24
|
--ring: #737373;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--popover: #141414;
|
|
30
28
|
--input: #737373;
|
|
31
29
|
--field: #0a0a0a;
|
package/themes/monochrome.css
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* monochrome — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* monochrome — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="monochrome"] {
|
|
5
3
|
color-scheme: light;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #c9c9c9;
|
|
26
24
|
--ring: #737373;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--input: #737373;
|
|
30
28
|
--field: #00000008;
|
|
31
29
|
--faint: #6a6a6a;
|
package/themes/nord-dark.css
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* nord-dark — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* nord-dark — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="nord-dark"] {
|
|
5
3
|
color-scheme: dark;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #282d36;
|
|
26
24
|
--ring: #567a84;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--popover: #101217;
|
|
30
28
|
--input: #545e73;
|
|
31
29
|
--field: #090a0c;
|
package/themes/nord.css
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* nord — a theme is one mode, one flat block
|
|
2
|
-
from the compiled document that shipped before the derivation was cut, so the colours are
|
|
3
|
-
unchanged. Edit this file by hand from here on: it is source now, not output. */
|
|
1
|
+
/* nord — a theme is one mode, one flat block, written by hand. */
|
|
4
2
|
[data-theme="nord"] {
|
|
5
3
|
color-scheme: light;
|
|
6
4
|
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
--border: #b8bdc8;
|
|
26
24
|
--ring: #6299a9;
|
|
27
25
|
|
|
28
|
-
/*
|
|
26
|
+
/* Optional: each falls back to a bridge default in tokens.css when left out */
|
|
29
27
|
--input: #798191;
|
|
30
28
|
--field: #0000000a;
|
|
31
29
|
--faint: #444e61;
|