@cascivo/tokens 0.3.8 → 0.4.0
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/package.json +3 -1
- package/src/index.css +5 -0
- package/src/layers.css +29 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cascivo/tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Three-level CSS design tokens (primitive → semantic → component)",
|
|
6
6
|
"keywords": [
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
],
|
|
31
31
|
"exports": {
|
|
32
32
|
".": "./src/index.css",
|
|
33
|
+
"./layers": "./src/layers.css",
|
|
34
|
+
"./layers.css": "./src/layers.css",
|
|
33
35
|
"./properties": "./src/properties.css",
|
|
34
36
|
"./properties.css": "./src/properties.css",
|
|
35
37
|
"./functions": "./src/functions.css",
|
package/src/index.css
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
/* cascivo Design System — Primitive Tokens */
|
|
3
3
|
/* These are raw values. Never use directly in components. Use semantic tokens. */
|
|
4
4
|
|
|
5
|
+
/* Establish the canonical cascade-layer order before any layered rule. Every
|
|
6
|
+
consumer path imports @cascivo/tokens (directly or via a theme), so this rides
|
|
7
|
+
along first and dedupes by URL. See ./layers.css for the authoritative order. */
|
|
8
|
+
@import './layers.css';
|
|
9
|
+
|
|
5
10
|
@layer cascivo.tokens {
|
|
6
11
|
:root {
|
|
7
12
|
/* ── Color Primitives ─────────────────────────────── */
|
package/src/layers.css
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* packages/tokens/src/layers.css */
|
|
2
|
+
/* cascivo — canonical @layer order (single source of truth). */
|
|
3
|
+
/*
|
|
4
|
+
* This statement is the ONE authoritative declaration of cascivo's cascade-layer
|
|
5
|
+
* order. Every entry path emits it first (via @import of this file, or — for the
|
|
6
|
+
* @cascivo/react aggregate — by prepending its contents), and identical @layer
|
|
7
|
+
* statements are idempotent, so the order is deterministic no matter which
|
|
8
|
+
* cascivo stylesheet a consumer loads first.
|
|
9
|
+
*
|
|
10
|
+
* Ordered lowest-priority → highest-priority:
|
|
11
|
+
*
|
|
12
|
+
* cascivo.reset consumer reset (box-sizing, margin/padding zeroing) — the floor
|
|
13
|
+
* cascivo.base minimal html font/color reset (@cascivo/themes/base.css)
|
|
14
|
+
* cascivo.tokens primitive design tokens (@cascivo/tokens)
|
|
15
|
+
* cascivo.component component + layout styles
|
|
16
|
+
* cascivo.theme semantic token values per [data-theme] (@cascivo/themes/*)
|
|
17
|
+
* cascivo.override consumer escape hatch — beats tokens, components, and themes
|
|
18
|
+
*
|
|
19
|
+
* theme > component matches the CLI scaffold and every example app: themes own
|
|
20
|
+
* the semantic tier, so a theme always wins over component defaults. cascivo.override
|
|
21
|
+
* sits on top: put brand/one-off overrides in `@layer cascivo.override { … }` and
|
|
22
|
+
* they beat everything cascivo ships — with no `:root:not([data-theme])` specificity
|
|
23
|
+
* fight. App-local sublayers (cascivo.example, cascivo.blocks.*) are not shipped by
|
|
24
|
+
* any package; insert them between cascivo.theme and cascivo.override.
|
|
25
|
+
*
|
|
26
|
+
* Guard: scripts/checks/layer-order.test.ts asserts every shipped/scaffolded
|
|
27
|
+
* @layer statement is an ordered subsequence of this one.
|
|
28
|
+
*/
|
|
29
|
+
@layer cascivo.reset, cascivo.base, cascivo.tokens, cascivo.component, cascivo.theme, cascivo.override;
|