@podoba/tailwind 0.0.55 → 0.0.56
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 +19 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
# @podoba/tailwind
|
|
2
2
|
|
|
3
|
-
The shared Tailwind
|
|
4
|
-
|
|
5
|
-
`bg-surface`, `text-fg-muted`, `text-heading2`, `rounded-panel`.
|
|
3
|
+
The shared Tailwind v4 theme. Binds `@podoba/tokens` CSS custom properties to Tailwind's
|
|
4
|
+
`@theme`, so `@podoba/react` primitives (and your app code) can use utilities like
|
|
5
|
+
`bg-surface`, `text-fg-muted`, `text-heading2`, `rounded-panel`. The theme is
|
|
6
|
+
`@theme inline`, so those utilities compile to `var(--color-surface)` and friends, never
|
|
7
|
+
to a copied value.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
// tailwind.config.ts in a consuming app
|
|
9
|
-
import podobaPreset from "@podoba/tailwind";
|
|
9
|
+
It is a CSS file, not a JS preset, and needs Tailwind v4:
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
```css
|
|
12
|
+
/* app.css */
|
|
13
|
+
@import "tailwindcss";
|
|
14
|
+
@import "@podoba/tokens/variables.css";
|
|
15
|
+
@import "@podoba/tailwind";
|
|
16
|
+
|
|
17
|
+
@source "./**/*.{ts,tsx}"; /* you own your source globs */
|
|
18
|
+
@source "../node_modules/@podoba/react/src/**/*.{ts,tsx}";
|
|
15
19
|
```
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
The theme is intentionally **content-less**. A theme that hardcodes source globs (as
|
|
22
|
+
`@app/ui` did, pointing at `../../apps/web`) breaks every other consumer.
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
An app that does not run Tailwind at all does not need this package: it imports the
|
|
25
|
+
prebuilt `@podoba/react/styles.css` instead. See the
|
|
26
|
+
[`@podoba/react` README](../react/README.md) for both setups and why an app picks one.
|
package/package.json
CHANGED