@rowkit/tokens 0.4.0 → 1.0.0-beta.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 +74 -12
- package/dist/color.d.ts +249 -493
- package/dist/css.d.ts +16 -4
- package/dist/index.d.ts +383 -352
- package/dist/index.js +90 -409
- package/dist/index.js.map +1 -1
- package/dist/radius.d.ts +21 -17
- package/dist/reference.d.ts +20 -0
- package/dist/reference.data.d.ts +2 -0
- package/dist/reference.js +403 -0
- package/dist/reference.js.map +1 -0
- package/dist/shadow.d.ts +76 -20
- package/dist/size.d.ts +194 -0
- package/dist/style.d.ts +129 -0
- package/dist/themes/index.d.ts +69 -0
- package/dist/themes/modern.d.ts +139 -0
- package/dist/themes-B0J8E0xq.js +1022 -0
- package/dist/themes-B0J8E0xq.js.map +1 -0
- package/dist/tokens.css +1268 -232
- package/dist/typography.d.ts +69 -46
- package/package.json +7 -3
- package/dist/blur.d.ts +0 -18
- package/dist/reference.html +0 -1275
package/dist/css.d.ts
CHANGED
|
@@ -5,10 +5,22 @@
|
|
|
5
5
|
* the stylesheet from them, so the two cannot drift. `css.test.ts` asserts that
|
|
6
6
|
* every token in every scale reaches the output.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* Two themes. Windows 98 is the default, carried by `:root`; the modern theme
|
|
9
|
+
* is switched on by `data-theme="modern"` on any element, and its dark scheme
|
|
10
|
+
* by the system or by `data-color-scheme="dark"` on that same element. A theme
|
|
11
|
+
* is a set of custom property values and nothing else, so themes nest: a
|
|
12
|
+
* region marked `data-theme="win98"` inside a modern page is Windows 98.
|
|
13
|
+
*
|
|
14
|
+
* One thing makes that work, and it is easy to break. A custom property whose
|
|
15
|
+
* value contains `var()` is resolved on the element that declares it, and
|
|
16
|
+
* descendants inherit the result. A theme therefore re-declares every token it
|
|
17
|
+
* changes on its own element; repointing a primitive at `:root` would not reach
|
|
18
|
+
* a semantic token that has already been resolved there.
|
|
19
|
+
*
|
|
20
|
+
* Shadows take one more step. Tailwind copies a `--shadow-*` value into each
|
|
21
|
+
* `shadow-*` utility rather than referencing it, so a theme could never change
|
|
22
|
+
* one. The `@theme` entry is therefore `var(--rk-shadow-*)`, and the value
|
|
23
|
+
* lives in that variable.
|
|
12
24
|
*
|
|
13
25
|
* @returns The complete stylesheet, ready to write to disk.
|
|
14
26
|
*/
|