@exsto/ds 0.0.1-rc.1 → 0.0.1-rc.2

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 CHANGED
@@ -30,10 +30,26 @@ That is the whole setup. **You do not need Tailwind.** `styles.css` ships
30
30
  precompiled: it carries the design tokens plus every utility the components
31
31
  themselves use.
32
32
 
33
- If you *do* use Tailwind, note that `styles.css` does not generate utilities for
34
- your own markup. Your Tailwind build does that, as it already would; this file
35
- only guarantees the components look right. The tokens are plain CSS custom
36
- properties on `:root`, so your own styles can read them.
33
+ ### If you use Tailwind
34
+
35
+ `styles.css` is compiled output, so it only contains the utilities the components
36
+ themselves use. To write `bg-card` or `text-muted-foreground` in your *own*
37
+ markup, import the token layer as well and let your Tailwind build generate the
38
+ whole vocabulary:
39
+
40
+ ```css
41
+ @import "tailwindcss";
42
+ @import "@exsto/ds/theme.css";
43
+ @import "@exsto/ds/styles.css";
44
+ ```
45
+
46
+ `theme.css` is uncompiled on purpose: it carries the tokens, the `.dark` scope
47
+ and the `@theme` mapping Tailwind needs to turn them into utilities. Do not copy
48
+ that block into your app, or it will drift from the design system.
49
+
50
+ Without it some token utilities still work, because our components happen to use
51
+ them, but the coverage is incidental: roughly half of `bg-*` and nearly every
52
+ `border-*` is absent.
37
53
 
38
54
  ### Dark mode
39
55
 
@@ -73,6 +89,7 @@ supply your own sheet. Calling it more than once is harmless.
73
89
  |---|---|
74
90
  | `@exsto/ds` | React components (the default) |
75
91
  | `@exsto/ds/styles.css` | Precompiled tokens and component styles |
92
+ | `@exsto/ds/theme.css` | Uncompiled tokens plus the Tailwind `@theme` mapping |
76
93
  | `@exsto/ds/elements` | `<edx-*>` custom elements and `registerElements()` |
77
94
 
78
95
  ## Status