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

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,33 @@ 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 "@exsto/ds/styles.css";
42
+ @import "tailwindcss";
43
+ @import "@exsto/ds/theme.css";
44
+ ```
45
+
46
+ **The order matters, and `styles.css` has to come first.** It is a compiled
47
+ Tailwind build, so its utilities land in the same cascade layer as yours, and at
48
+ equal specificity the later rule wins. Import it after your Tailwind entry and
49
+ its unconditional `.hidden` beats your `.md:table-cell`: responsive columns
50
+ vanish, widths collapse. Library CSS before app CSS, as with any CSS dependency.
51
+
52
+ `theme.css` is uncompiled on purpose. It carries the tokens, the `.dark` scope,
53
+ the brand layer (Inter, `text-2xs`) and the `@theme` mapping Tailwind needs to
54
+ turn them into utilities. Do not copy that block into your app, or it will drift
55
+ from the design system.
56
+
57
+ Without it some token utilities still work, because our components happen to use
58
+ them, but the coverage is incidental: roughly half of `bg-*` and nearly every
59
+ `border-*` is absent.
37
60
 
38
61
  ### Dark mode
39
62
 
@@ -73,6 +96,7 @@ supply your own sheet. Calling it more than once is harmless.
73
96
  |---|---|
74
97
  | `@exsto/ds` | React components (the default) |
75
98
  | `@exsto/ds/styles.css` | Precompiled tokens and component styles |
99
+ | `@exsto/ds/theme.css` | Uncompiled tokens, brand layer, and the Tailwind `@theme` mapping |
76
100
  | `@exsto/ds/elements` | `<edx-*>` custom elements and `registerElements()` |
77
101
 
78
102
  ## Status