stillwind 0.11.0 → 0.13.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.
Files changed (120) hide show
  1. package/AGENTS_TEMPLATE.md +3 -2
  2. package/CHANGELOG.md +80 -0
  3. package/README.md +3 -3
  4. package/css/builtin-utilities/tw-borders.css +59 -59
  5. package/css/builtin-utilities/tw-effects.css +53 -53
  6. package/css/builtin-utilities/tw-typography.css +13 -13
  7. package/dist/class-object-C87DR3v2.js +6 -0
  8. package/dist/class-object-C87DR3v2.js.map +1 -0
  9. package/dist/class-object-CR0QHoF9.d.ts +10 -0
  10. package/dist/{class-string-C5YFtXQn.d.ts → class-string-BlClX8JK.d.ts} +2 -2
  11. package/dist/class-string-CiNTVHYm.js +6 -0
  12. package/dist/{class-string-KnYInbiw.js.map → class-string-CiNTVHYm.js.map} +1 -1
  13. package/dist/{formats-Ctf2WFc-.js → formats-DP9B9SG6.js} +228 -113
  14. package/dist/formats-DP9B9SG6.js.map +1 -0
  15. package/dist/{formats-aeLCNAXl.d.ts → formats-NBNjMP5R.d.ts} +34 -12
  16. package/dist/frameworks/alpine.d.ts +5 -3
  17. package/dist/frameworks/alpine.js +3 -1
  18. package/dist/frameworks/alpine.js.map +1 -1
  19. package/dist/frameworks/astro.d.ts +3 -3
  20. package/dist/frameworks/astro.js +1 -1
  21. package/dist/frameworks/lit.d.ts +5 -3
  22. package/dist/frameworks/lit.js +3 -1
  23. package/dist/frameworks/lit.js.map +1 -1
  24. package/dist/frameworks/preact.d.ts +3 -3
  25. package/dist/frameworks/preact.js +1 -1
  26. package/dist/frameworks/qwik.d.ts +3 -3
  27. package/dist/frameworks/qwik.js +1 -1
  28. package/dist/frameworks/react.d.ts +2 -2
  29. package/dist/frameworks/react.js +1 -1
  30. package/dist/frameworks/solid.d.ts +3 -3
  31. package/dist/frameworks/solid.js +1 -1
  32. package/dist/frameworks/svelte.d.ts +3 -3
  33. package/dist/frameworks/svelte.js +1 -1
  34. package/dist/frameworks/vanilla.d.ts +5 -3
  35. package/dist/frameworks/vanilla.js +6 -1
  36. package/dist/frameworks/vanilla.js.map +1 -0
  37. package/dist/frameworks/vue.d.ts +3 -3
  38. package/dist/frameworks/vue.js +1 -1
  39. package/dist/{index-DBpgaaD7.d.ts → index-DpaDcczW.d.ts} +157 -57
  40. package/dist/macro/index.d.ts +2 -2
  41. package/dist/macro/index.js +1 -1
  42. package/dist/runtime/development.d.ts +16 -8
  43. package/dist/runtime/development.js +57 -21
  44. package/dist/runtime/development.js.map +1 -1
  45. package/dist/runtime/index.d.ts +2 -2
  46. package/dist/runtime/index.js +1 -1
  47. package/dist/style-dMBm8aX_.js +50 -0
  48. package/dist/style-dMBm8aX_.js.map +1 -0
  49. package/docs/agents.md +1 -0
  50. package/docs/at-rules/apply.md +1 -1
  51. package/docs/at-rules/custom-variant.md +1 -1
  52. package/docs/at-rules/slot.md +1 -1
  53. package/docs/at-rules/stillwind-property.md +1 -1
  54. package/docs/at-rules/stillwind-registry.md +7 -7
  55. package/docs/at-rules/stillwind-require-properties.md +1 -1
  56. package/docs/at-rules/stillwind-undef-arbitrary-property.md +1 -1
  57. package/docs/at-rules/stillwind-undef-utility.md +1 -1
  58. package/docs/at-rules/stillwind-undef-variant.md +1 -1
  59. package/docs/at-rules/theme.md +5 -5
  60. package/docs/at-rules/utility.md +43 -4
  61. package/docs/at-rules/variant.md +1 -1
  62. package/docs/cli.md +146 -51
  63. package/docs/concepts/css-ordering.md +46 -7
  64. package/docs/concepts/how-styles-compile.md +8 -8
  65. package/docs/configuration.md +63 -4
  66. package/docs/errors/SW01001.md +1 -1
  67. package/docs/errors/SW03001.md +1 -1
  68. package/docs/errors/SW10004.md +1 -1
  69. package/docs/errors/SW10005.md +1 -1
  70. package/docs/errors/SW10006.md +34 -0
  71. package/docs/errors/SW11001.md +1 -1
  72. package/docs/errors/SW12001.md +1 -1
  73. package/docs/errors/SW12002.md +1 -1
  74. package/docs/errors/SW13002.md +1 -1
  75. package/docs/errors/SW14001.md +1 -1
  76. package/docs/errors/SW14002.md +1 -1
  77. package/docs/errors/SW14003.md +1 -1
  78. package/docs/errors/SW14004.md +1 -1
  79. package/docs/errors/SW14007.md +1 -1
  80. package/docs/errors/SW32003.md +1 -1
  81. package/docs/errors/SW32005.md +1 -1
  82. package/docs/errors/index.md +1 -0
  83. package/docs/formatters.md +34 -2
  84. package/docs/guides/lint-adoption.md +2 -0
  85. package/docs/guides/migrating-from-tailwind.md +60 -9
  86. package/docs/guides/recommended-practices.md +18 -0
  87. package/docs/guides/reusable-styles.md +2 -2
  88. package/docs/guides/tailwind-compatibility.md +8 -0
  89. package/docs/index.md +4 -5
  90. package/docs/integrations.md +314 -79
  91. package/docs/lints/conflicting-utilities.md +9 -0
  92. package/docs/lints/cyclic-style-order.md +61 -0
  93. package/docs/lints/index.md +26 -10
  94. package/docs/lints/{invalid-cva-config.md → invalid-recipe-config.md} +8 -8
  95. package/docs/lints/{invalid-cva-input.md → invalid-recipe-input.md} +9 -9
  96. package/docs/lints/invalid-rule-group-input.md +1 -1
  97. package/docs/lints/missing-view-transition-name.md +1 -1
  98. package/docs/lints/multiple-style-forwards.md +59 -0
  99. package/docs/lints/partial-utility-override.md +77 -0
  100. package/docs/lints/prefer-direct-styling.md +1 -1
  101. package/docs/lints/suspending-macro-argument.md +1 -1
  102. package/docs/lints/utility-class-selector.md +72 -0
  103. package/docs/llms.txt +238 -0
  104. package/docs/macros/index.md +1 -1
  105. package/docs/macros/recipe.md +246 -0
  106. package/docs/macros/style.md +72 -0
  107. package/docs/macros/when.md +1 -1
  108. package/docs/plugins/iconify.md +2 -0
  109. package/docs/utilities-and-variants.md +2 -0
  110. package/package.json +6 -6
  111. package/skills/setup-stillwind/SKILL.md +1 -2
  112. package/skills/stillwind/SKILL.md +19 -12
  113. package/dist/class-object-BaK8uudd.d.ts +0 -9
  114. package/dist/class-object-DNcjzcfH.js +0 -6
  115. package/dist/class-object-DNcjzcfH.js.map +0 -1
  116. package/dist/class-string-KnYInbiw.js +0 -6
  117. package/dist/formats-Ctf2WFc-.js.map +0 -1
  118. package/dist/style-BE8vuLiO.js +0 -44
  119. package/dist/style-BE8vuLiO.js.map +0 -1
  120. package/docs/macros/cva.md +0 -155
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: "SW10006: Unavailable style.forward()"
3
+ description: "style.forward() is used through an entrypoint that does not provide it."
4
+ ---
5
+
6
+ # SW10006: Unavailable style.forward()
7
+
8
+ This error occurs when the code calls `style.forward()` through the Lit,
9
+ Alpine, or vanilla entrypoint. These entrypoints have no component props to
10
+ forward, so they do not provide `style.forward()`.
11
+
12
+ ## Reported
13
+
14
+ ```ts
15
+ import { style } from "stillwind/vanilla";
16
+
17
+ export const props = (attributes: { class?: string }) => style("p-4", style.forward(attributes));
18
+ ```
19
+
20
+ > SW10006: style.forward() is not available from `stillwind/vanilla`
21
+
22
+ ## Fixed
23
+
24
+ ```ts
25
+ import { style } from "stillwind/vanilla";
26
+
27
+ export const props = (attributes: { class?: string }) => style("p-4", { class: attributes.class });
28
+ ```
29
+
30
+ ## How to fix
31
+
32
+ - Pass the received classes in a `class` field, as in `{ class: attributes.class }`.
33
+ A `class` field passes classes only. To set inline style values, use custom
34
+ properties such as `{ "--size": value }`.
@@ -16,7 +16,7 @@ const first = style(second, "rounded-md");
16
16
  const second = style(first, "p-4");
17
17
  ```
18
18
 
19
- > SW11001: style composition dependency cycle
19
+ > SW11001: style composition contains a circular dependency
20
20
 
21
21
  ## Fixed
22
22
 
@@ -18,7 +18,7 @@ current = style.ref("panel");
18
18
  style({ [current("hover")]: "underline" });
19
19
  ```
20
20
 
21
- > SW12001: incompatible declaration identities: TS2322: Type 'StyleRef<string>' is not assignable to type 'StyleRef<"stillwind-identity/v2:eyJraW5kIjoicmVmIiwibW9kdWxlSWQiOiJSZWZlcmVuY2UudHN4IiwicGF0aCI6W10sIm9yZGluYWwiOjAsImJpbmRpbmdOYW1lIjoiY3VycmVudCJ9">'.
21
+ > SW12001: reassignment changes the Stillwind declaration identity: TS2322: Type 'StyleRef<string>' is not assignable to type 'StyleRef<"stillwind-identity/v2:eyJraW5kIjoicmVmIiwibW9kdWxlSWQiOiJSZWZlcmVuY2UudHN4IiwicGF0aCI6W10sIm9yZGluYWwiOjAsImJpbmRpbmdOYW1lIjoiY3VycmVudCJ9">'.
22
22
  > Type 'string' is not assignable to type '"stillwind-identity/v2:eyJraW5kIjoicmVmIiwibW9kdWxlSWQiOiJSZWZlcmVuY2UudHN4IiwicGF0aCI6W10sIm9yZGluYWwiOjAsImJpbmRpbmdOYW1lIjoiY3VycmVudCJ9"'. Preserve declaration candidates with an explicit union or a generic parameter.
23
23
  >
24
24
  > Source format: Jsx
@@ -18,7 +18,7 @@ const current: ReturnType<typeof style.ref> = card;
18
18
  style({ [current("hover")]: "underline" });
19
19
  ```
20
20
 
21
- > SW12002: cannot determine finite declaration identities: Cannot determine a finite set of declaration identities. Preserve the value's inferred type, use an explicit union, or use a generic parameter.
21
+ > SW12002: cannot statically determine Stillwind declaration identity: Cannot determine a finite set of declaration identities. Preserve the value's inferred type, use an explicit union, or use a generic parameter.
22
22
  >
23
23
  > Source format: Jsx
24
24
 
@@ -16,7 +16,7 @@ start of the parsed text, counting from zero.
16
16
  color: blue;
17
17
  ```
18
18
 
19
- > SW13002: unterminated CSS block at byte 27
19
+ > SW13002: unterminated CSS block
20
20
 
21
21
  ## Fixed
22
22
 
@@ -21,7 +21,7 @@ imports only some parts of Stillwind.
21
21
  style("p-4");
22
22
  ```
23
23
 
24
- > SW14001: generated utilities require an @stillwind-slot utilities; in the CSS entry graph
24
+ > SW14001: generated utilities require `@stillwind-slot utilities;` in the CSS entry graph
25
25
 
26
26
  ## Fixed
27
27
 
@@ -24,7 +24,7 @@ const fade = style.keyframes({
24
24
  style(fade(""));
25
25
  ```
26
26
 
27
- > SW14002: generated support requires an @stillwind-slot keyframes; in the CSS entry graph
27
+ > SW14002: generated support requires `@stillwind-slot keyframes;` in the CSS entry graph
28
28
 
29
29
  ## Fixed
30
30
 
@@ -20,7 +20,7 @@ utility needs.
20
20
  }
21
21
  ```
22
22
 
23
- > SW14003: invalid Stillwind property requirement at byte 9659
23
+ > SW14003: invalid Stillwind property requirement
24
24
 
25
25
  ## Fixed
26
26
 
@@ -23,7 +23,7 @@ The definition can be in your stylesheet or in a plugin.
23
23
  style("spin-x");
24
24
  ```
25
25
 
26
- > SW14004: utility `spin-x` has an invalid property requirement at body byte 0
26
+ > SW14004: utility `spin-x` has an invalid property requirement
27
27
 
28
28
  ## Fixed
29
29
 
@@ -16,7 +16,7 @@ such as no token name.
16
16
  }
17
17
  ```
18
18
 
19
- > SW14007: invalid --theme() reference at value byte 9666: invalid --theme() property `` at byte 0
19
+ > SW14007: invalid `--theme()` reference: `` is not a custom property name
20
20
 
21
21
  ## Fixed
22
22
 
@@ -19,7 +19,7 @@ loader.provide(0, "root.css", '@import "./tokens.css";');
19
19
  loader.provide(99, "tokens.css", "@theme { --color-brand: red; }");
20
20
  ```
21
21
 
22
- > SW32003: unknown or duplicate request ID 99
22
+ > SW32003: unknown or duplicate request ID 99 (in root.css)
23
23
 
24
24
  ## Fixed
25
25
 
@@ -19,7 +19,7 @@ loader.provide(0, "root.css", ".card { color: red; }");
19
19
  loader.provide(0, "root.css", ".card { color: blue; }");
20
20
  ```
21
21
 
22
- > SW32005: provide called after completion
22
+ > SW32005: provide called after completion (in root.css)
23
23
 
24
24
  ## Fixed
25
25
 
@@ -36,6 +36,7 @@ The first digits of a code tell you what to do next:
36
36
  - [SW10003](https://stillwind.dev/docs/errors/SW10003): Invalid Unicode string
37
37
  - [SW10004](https://stillwind.dev/docs/errors/SW10004): Unconsumed macro use
38
38
  - [SW10005](https://stillwind.dev/docs/errors/SW10005): Untransformed macro reference
39
+ - [SW10006](https://stillwind.dev/docs/errors/SW10006): Unavailable style.forward()
39
40
  - [SW11001](https://stillwind.dev/docs/errors/SW11001): Style composition cycle
40
41
  - [SW11002](https://stillwind.dev/docs/errors/SW11002): CSS module ordering cycle
41
42
  - [SW11003](https://stillwind.dev/docs/errors/SW11003): Unavailable style base
@@ -5,6 +5,8 @@ description: "Sort utilities together with Prettier, Oxfmt, or another document
5
5
 
6
6
  # Formatters
7
7
 
8
+ > Command examples use `vp` (Vite+); substitute your project's package manager (such as `pnpm`, `npm`, or `bun`).
9
+
8
10
  Stillwind sorts utilities, and a document formatter controls layout and whitespace.
9
11
  How you combine them depends on the formatter:
10
12
 
@@ -69,8 +71,38 @@ The plugin only sorts. To replace utilities with their canonical spellings, run
69
71
 
70
72
  ## Other formatters
71
73
 
72
- Run `stillwind fmt` first. It sorts utilities and keeps the source layout, and the
73
- formatter then controls whitespace:
74
+ To format in one pass with `stillwind fmt` and `stillwind check`, configure a
75
+ project [`hooks`](https://stillwind.dev/docs/configuration#hooks) entry that transforms each buffer in
76
+ memory after Stillwind sorts utilities:
77
+
78
+ ```ts title="stillwind.config.ts"
79
+ import { format as oxfmt } from "oxfmt";
80
+ import { defineConfig, defineHook } from "stillwind/config";
81
+
82
+ export default defineConfig({
83
+ projects: [
84
+ {
85
+ css: "./src/stillwind.css",
86
+ files: ["src/**/*.{ts,tsx,vue,svelte,astro}"],
87
+ hooks: [
88
+ defineHook({
89
+ name: "oxfmt",
90
+ async format(file) {
91
+ const result = await oxfmt(file.path, file.code);
92
+ if (result.errors.length) {
93
+ throw new Error(result.errors.map((error) => error.message).join("\n"));
94
+ }
95
+ return result.code;
96
+ },
97
+ }),
98
+ ],
99
+ },
100
+ ],
101
+ });
102
+ ```
103
+
104
+ Without a hook, run `stillwind fmt` first. It sorts utilities and keeps the
105
+ source layout, and the formatter then controls whitespace:
74
106
 
75
107
  ```sh
76
108
  vp exec stillwind fmt
@@ -5,6 +5,8 @@ description: "Catch misspelled utilities, conflicts, and project policy violatio
5
5
 
6
6
  # Checks in the editor and CI
7
7
 
8
+ > Command examples use `vp` (Vite+); substitute your project's package manager (such as `pnpm`, `npm`, or `bun`).
9
+
8
10
  You want to catch misspelled utilities, conflicting styles, and values outside
9
11
  your theme before you merge a change. Stillwind checks them with lint rules.
10
12
  The CLI, CI, the editor, and AI agents all use the same rules from
@@ -16,6 +16,14 @@ generates CSS only for the utilities in `style()` calls. A class in a plain
16
16
  `className` string, or in HTML from another source, gets no CSS after the
17
17
  migration. Move every utility that you want to keep into `style()`.
18
18
 
19
+ ## Contents
20
+
21
+ - [Replace the stylesheet and the build plugin](#replace-the-stylesheet-and-the-build-plugin)
22
+ - [Move classes into style()](#move-classes-into-style)
23
+ - [Replace class helpers](#replace-class-helpers)
24
+ - [Move configuration](#move-configuration)
25
+ - [Check the migrated code](#check-the-migrated-code)
26
+
19
27
  ## Replace the stylesheet and the build plugin
20
28
 
21
29
  In your stylesheet, replace `@import "tailwindcss"` with `@import "stillwind"`:
@@ -65,14 +73,15 @@ write a one-off codemod for your repository that converts them in one pass.
65
73
 
66
74
  ## Replace class helpers
67
75
 
68
- [`style()`](https://stillwind.dev/docs/macros/style) and [`style.cva()`](https://stillwind.dev/docs/macros/cva) replace
76
+ [`style()`](https://stillwind.dev/docs/macros/style) and [`style.recipe()`](https://stillwind.dev/docs/macros/recipe) replace
69
77
  the libraries that Tailwind projects use to build class strings:
70
78
 
71
- | Library | Stillwind |
72
- | ------------------------------------------------------------------------------------------------- | ----------------------------------------- |
73
- | [`clsx`](https://github.com/lukeed/clsx), [`classnames`](https://github.com/JedWatson/classnames) | `style()` with conditions |
74
- | [`tailwind-merge`](https://github.com/dcastil/tailwind-merge) | Compose a base with new utilities |
75
- | `cva` from [Class Variance Authority](https://cva.style/) | `style.cva()` with the same configuration |
79
+ | Library | Stillwind |
80
+ | ------------------------------------------------------------------------------------------------- | -------------------------------------------- |
81
+ | [`clsx`](https://github.com/lukeed/clsx), [`classnames`](https://github.com/JedWatson/classnames) | `style()` with conditions |
82
+ | [`tailwind-merge`](https://github.com/dcastil/tailwind-merge) | Compose a base with new utilities |
83
+ | `cva` from [Class Variance Authority](https://cva.style/) | `style.recipe()` with the same configuration |
84
+ | `tv` from [tailwind-variants](https://www.tailwind-variants.org/) | `style.recipe()` with `slots` |
76
85
 
77
86
  ### clsx and classnames
78
87
 
@@ -102,15 +111,21 @@ competing declarations when the other cascade criteria, such as specificity
102
111
  and importance, are equal. See [Override a style](https://stillwind.dev/docs/guides/style#override-a-style)
103
112
  and [CSS ordering](https://stillwind.dev/docs/concepts/css-ordering).
104
113
 
114
+ `twMerge()` removes the overridden utility, but Stillwind keeps its CSS. When the
115
+ overriding utility sets fewer properties, the other properties keep their values.
116
+ For example, `text-[0.8rem]` over `text-sm` leaves the line height of `text-sm`.
117
+ [partial-utility-override](https://stillwind.dev/docs/lints/partial-utility-override) reports these
118
+ overrides in bases, conditions, and recipe options.
119
+
105
120
  ### cva
106
121
 
107
- Replace `cva(` with `style.cva(`, and import `VariantProps` from your framework's
122
+ Replace `cva(` with `style.recipe(`, and import `VariantProps` from your framework's
108
123
  entrypoint:
109
124
 
110
125
  ```tsx
111
126
  import { style, type VariantProps } from "stillwind/react";
112
127
 
113
- const button = style.cva("rounded-md px-4 py-2", {
128
+ const button = style.recipe("rounded-md px-4 py-2", {
114
129
  variants: {
115
130
  tone: {
116
131
  neutral: "bg-gray-100",
@@ -130,9 +145,39 @@ export function Button({ tone }: VariantProps<typeof button>) {
130
145
  `variants`, `defaultVariants`, and `compoundVariants` work as in
131
146
  class-variance-authority. Write each option value as a plain utility string,
132
147
  without `&&` or a ternary. The props that the factory returns cannot be passed
133
- to `style()` as a base. The [`style.cva()` reference](https://stillwind.dev/docs/macros/cva) lists
148
+ to `style()` as a base. The [`style.recipe()` reference](https://stillwind.dev/docs/macros/recipe) lists
134
149
  the other differences.
135
150
 
151
+ ### tailwind-variants
152
+
153
+ Replace `tv({ base, ... })` with `style.recipe(base, { ... })`. Move `base` to the
154
+ first argument, and keep `slots`, `variants`, `defaultVariants`,
155
+ `compoundVariants`, and `compoundSlots`. Each slot function returns props
156
+ instead of a class string, so spread it onto the element:
157
+
158
+ ```tsx
159
+ import { style } from "stillwind/react";
160
+
161
+ const card = style.recipe("flex gap-2", {
162
+ slots: {
163
+ icon: "size-4",
164
+ },
165
+ });
166
+
167
+ export function Card() {
168
+ const { base, icon } = card();
169
+ return (
170
+ <div {...base()}>
171
+ <span {...icon()} />
172
+ </div>
173
+ );
174
+ }
175
+ ```
176
+
177
+ `extend` and the `twMerge` options are not supported. Utilities do not need a
178
+ runtime merge, because the compiler's CSS order decides which declaration wins.
179
+ See [Slots](https://stillwind.dev/docs/macros/recipe#slots).
180
+
136
181
  For new components, consider state variants and `data-*` attributes instead of
137
182
  options. See [Reusable styles](https://stillwind.dev/docs/guides/reusable-styles).
138
183
 
@@ -191,6 +236,12 @@ with its modifier classes, such as `btn btn-outline` in daisyUI. The
191
236
  [Plugins](https://stillwind.dev/docs/lints/conflicting-utilities#plugins) section of the rule page
192
237
  lists a setting for each tested plugin that stops these reports.
193
238
 
239
+ Selectors that read utility names from the `class` attribute, such as
240
+ `[&_svg:not([class*='size-'])]:size-4` in shadcn/ui components, do not work, because
241
+ Stillwind writes generated class names. The
242
+ [utility-class-selector](https://stillwind.dev/docs/lints/utility-class-selector) lint rule reports them,
243
+ and `stillwind check --fix` rewrites the common default-size form.
244
+
194
245
  ### Compare computed styles
195
246
 
196
247
  A successful build and clean CLI checks do not prove that the pages look the
@@ -8,6 +8,24 @@ description: "Keep styles next to their elements, reuse them through components,
8
8
  This page collects the practices that keep a Stillwind project easy to change.
9
9
  It also lists the mistakes that silently produce no CSS. The examples use React.
10
10
 
11
+ ## Contents
12
+
13
+ - [Keep styles next to their elements](#keep-styles-next-to-their-elements)
14
+ - [Spread style() onto the element](#spread-style-onto-the-element)
15
+ - [Express states with attributes](#express-states-with-attributes)
16
+ - [Connect elements with refs](#connect-elements-with-refs)
17
+ - [Define animations in their components](#define-animations-in-their-components)
18
+ - [Declare refs and animations in the smallest scope](#declare-refs-and-animations-in-the-smallest-scope)
19
+ - [Express options with one of a fixed set of values](#express-options-with-one-of-a-fixed-set-of-values)
20
+ - [Group utilities by variant](#group-utilities-by-variant)
21
+ - [Keep values in the theme](#keep-values-in-the-theme)
22
+ - [Choose how to define themes](#choose-how-to-define-themes)
23
+ - [Use breakpoints from the theme in JavaScript](#use-breakpoints-from-the-theme-in-javascript)
24
+ - [Define utilities with @apply](#define-utilities-with-apply)
25
+ - [Avoid separate CSS](#avoid-separate-css)
26
+ - [Run the checks after each change](#run-the-checks-after-each-change)
27
+ - [Mistakes that produce no CSS](#mistakes-that-produce-no-css)
28
+
11
29
  ## Keep styles next to their elements
12
30
 
13
31
  Write the utilities in a [`style()`](https://stillwind.dev/docs/guides/style) call on the element that
@@ -109,7 +109,7 @@ set a custom property instead. See
109
109
 
110
110
  ## Migrate CVA components
111
111
 
112
- `style.cva()` accepts the configuration of `cva` from class-variance-authority.
112
+ `style.recipe()` accepts the configuration of `cva` from class-variance-authority.
113
113
  Use it to migrate existing CVA components. See
114
114
  [Replace class helpers](https://stillwind.dev/docs/guides/migrating-from-tailwind#replace-class-helpers)
115
- and the [`style.cva()` reference](https://stillwind.dev/docs/macros/cva).
115
+ and the [`style.recipe()` reference](https://stillwind.dev/docs/macros/recipe).
@@ -14,6 +14,14 @@ For the usage of Tailwind features, see the
14
14
  [Tailwind CSS documentation](https://tailwindcss.com/docs). To check the CSS of a
15
15
  utility or variant, use [Built-in utilities and variants](https://stillwind.dev/docs/utilities-and-variants).
16
16
 
17
+ ## Contents
18
+
19
+ - [What works](#what-works)
20
+ - [How Stillwind checks compatibility](#how-stillwind-checks-compatibility)
21
+ - [Plugins and CSS packages](#plugins-and-css-packages)
22
+ - [What Stillwind adds](#what-stillwind-adds)
23
+ - [What Stillwind does not support](#what-stillwind-does-not-support)
24
+
17
25
  ## What works
18
26
 
19
27
  | Tailwind feature | Support |
package/docs/index.md CHANGED
@@ -5,6 +5,8 @@ description: "Add Stillwind to a Vite and React application, style a component,
5
5
 
6
6
  # Getting started
7
7
 
8
+ > Command examples use `vp` (Vite+); substitute your project's package manager (such as `pnpm`, `npm`, or `bun`).
9
+
8
10
  This guide adds Stillwind to a Vite application that uses React. At the end, a
9
11
  button uses Stillwind styles, and the CLI checks them. For another framework or
10
12
  build tool, follow the same steps and use the build setup from
@@ -62,13 +64,10 @@ export default defineConfig({
62
64
  `css` selects the stylesheet. `files` selects the files that the CLI and the
63
65
  editor check.
64
66
 
65
- > **Builds compile imports**
67
+ > **How files is used**
66
68
  >
67
69
  > The build compiles every module that your application imports, whether or not `files` matches it.
68
- > The CLI and the language server (LSP) use `files` to find source files, including files that the
69
- > application does not import. A Vite build also loads the files that `files` matches into the type
70
- > checker before it compiles the first module, so pages that the application loads through dynamic
71
- > imports share one checker project. The dev server does not read these files in advance.
70
+ > The CLI and the editor use `files` to discover source files to check.
72
71
 
73
72
  Add Stillwind to `vite.config.ts`:
74
73