@kolkrabbi/kol-theme 0.3.0 → 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/README.md +2 -0
- package/kol-components-organisms.css +11 -0
- package/kol-theme.css +18 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,6 +19,8 @@ In a Vite + Tailwind v4 app, import the barrel after Tailwind:
|
|
|
19
19
|
|
|
20
20
|
Cascade order is load-bearing — `kol-theme` must come after Tailwind so its component classes and tokens resolve correctly. Individual files are also reachable (`@kolkrabbi/kol-theme/kol-color.css`, etc.) if you need finer control.
|
|
21
21
|
|
|
22
|
+
All KOL rule CSS lives in the `components` cascade layer, so your Tailwind utility classes always win over KOL chrome (`<Input className="hidden sm:block">` behaves as written). Your own unlayered CSS wins over everything KOL ships.
|
|
23
|
+
|
|
22
24
|
## Fonts
|
|
23
25
|
|
|
24
26
|
The typography CSS references the brand fonts at absolute paths (`/fonts/Right-Grotesk/…`, `/fonts/jetbrains-mono/…`). **The package does not ship the font files** — your app must serve them from `/fonts/` (e.g. drop them in your `public/` dir). The showcase in this repo does exactly that. Without them, type falls back to system fonts.
|
|
@@ -45,6 +45,17 @@
|
|
|
45
45
|
scrollbar-width: none;
|
|
46
46
|
border: 1px solid var(--kol-fg-08);
|
|
47
47
|
border-radius: 4px;
|
|
48
|
+
/* Scroll affordance: with the scrollbar hidden, a clipped table reads as
|
|
49
|
+
* cut-off data on narrow viewports. Edge shadows appear only on the
|
|
50
|
+
* scrollable side (surface-colored covers ride the content and mask them
|
|
51
|
+
* at the extremes). */
|
|
52
|
+
background:
|
|
53
|
+
linear-gradient(to right, var(--kol-surface-primary) 40%, transparent) left / 32px 100%,
|
|
54
|
+
linear-gradient(to left, var(--kol-surface-primary) 40%, transparent) right / 32px 100%,
|
|
55
|
+
linear-gradient(to right, var(--kol-fg-16), transparent) left / 14px 100%,
|
|
56
|
+
linear-gradient(to left, var(--kol-fg-16), transparent) right / 14px 100%;
|
|
57
|
+
background-repeat: no-repeat;
|
|
58
|
+
background-attachment: local, local, scroll, scroll;
|
|
48
59
|
}
|
|
49
60
|
|
|
50
61
|
.kol-table-wrapper::-webkit-scrollbar { display: none; }
|
package/kol-theme.css
CHANGED
|
@@ -25,19 +25,25 @@
|
|
|
25
25
|
* (NEW) → kol-utilities.css (curated slice of _new-css/utilities.css)
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
@import "./kol-
|
|
34
|
-
@import "./kol-
|
|
35
|
-
@import "./kol-
|
|
36
|
-
@import "./kol-
|
|
37
|
-
@import "./kol-
|
|
38
|
-
@import "./kol-
|
|
28
|
+
/* Everything KOL ships lives in the `components` cascade layer. Tailwind v4
|
|
29
|
+
* declares `@layer theme, base, components, utilities` — layering here means
|
|
30
|
+
* consumer utility classes (a later layer) can always override KOL chrome,
|
|
31
|
+
* while KOL still beats preflight (`base`). Unlayered consumer CSS wins over
|
|
32
|
+
* all of it, as it should. */
|
|
33
|
+
@import "./kol-base-tokens.css" layer(components);
|
|
34
|
+
@import "./kol-color.css" layer(components);
|
|
35
|
+
@import "./kol-opacity.css" layer(components);
|
|
36
|
+
@import "./kol-opaque.css" layer(components);
|
|
37
|
+
@import "./kol-typography.css" layer(components);
|
|
38
|
+
@import "./kol-typography-mono.css" layer(components);
|
|
39
|
+
@import "./kol-type-mono-classes.css" layer(components);
|
|
40
|
+
@import "./kol-utilities.css" layer(components);
|
|
41
|
+
@import "./kol-components-atoms.css" layer(components);
|
|
42
|
+
@import "./kol-components-molecules.css" layer(components);
|
|
43
|
+
@import "./kol-components-organisms.css" layer(components);
|
|
39
44
|
|
|
40
45
|
/* Theme-level design tokens */
|
|
46
|
+
@layer components {
|
|
41
47
|
:root {
|
|
42
48
|
/* Spacing scale (4px base) */
|
|
43
49
|
--kol-spacing-1: 0.25rem; /* 4px */
|
|
@@ -108,3 +114,4 @@
|
|
|
108
114
|
--kol-shadow-xl: 0 20px 25px rgba(255, 255, 255, 0.1);
|
|
109
115
|
--kol-shadow-inner: inset 0 2px 4px rgba(255, 255, 255, 0.04);
|
|
110
116
|
}
|
|
117
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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",
|