stillwind 0.8.0 → 0.10.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/CHANGELOG.md +212 -0
- package/css/builtin-variants/tw-relationship.css +4 -4
- package/css/builtins.css +1 -1
- package/dist/frameworks/alpine.d.ts +1 -1
- package/dist/frameworks/astro.d.ts +1 -1
- package/dist/frameworks/lit.d.ts +1 -1
- package/dist/frameworks/preact.d.ts +1 -1
- package/dist/frameworks/qwik.d.ts +1 -1
- package/dist/frameworks/solid.d.ts +1 -1
- package/dist/frameworks/svelte.d.ts +1 -1
- package/dist/frameworks/vanilla.d.ts +1 -1
- package/dist/frameworks/vue.d.ts +1 -1
- package/docs/at-rules/apply.md +5 -5
- package/docs/at-rules/custom-variant.md +12 -12
- package/docs/at-rules/index.md +19 -19
- package/docs/at-rules/plugin.md +13 -7
- package/docs/at-rules/registry-directives.md +9 -9
- package/docs/at-rules/slot.md +6 -6
- package/docs/at-rules/stillwind-css-template.md +7 -7
- package/docs/at-rules/stillwind-property.md +10 -10
- package/docs/at-rules/stillwind-registry.md +18 -18
- package/docs/at-rules/stillwind-require-properties.md +9 -9
- package/docs/at-rules/stillwind-slot.md +6 -6
- package/docs/at-rules/stillwind-undef-arbitrary-property.md +9 -9
- package/docs/at-rules/stillwind-undef-utility.md +10 -10
- package/docs/at-rules/stillwind-undef-variant.md +6 -6
- package/docs/at-rules/theme.md +23 -23
- package/docs/at-rules/utility.md +30 -30
- package/docs/at-rules/variant.md +6 -6
- package/docs/cli.md +7 -7
- package/docs/concepts/css-ordering.md +17 -17
- package/docs/concepts/how-styles-compile.md +14 -14
- package/docs/concepts/stylesheets.md +4 -4
- package/docs/configuration.md +29 -29
- package/docs/editors.md +8 -8
- package/docs/errors/SW01003.md +1 -1
- package/docs/errors/SW10001.md +1 -1
- package/docs/errors/SW10002.md +1 -1
- package/docs/errors/SW10004.md +6 -6
- package/docs/errors/SW10005.md +1 -1
- package/docs/errors/SW11001.md +1 -1
- package/docs/errors/SW11003.md +1 -1
- package/docs/errors/SW12001.md +2 -2
- package/docs/errors/SW12002.md +1 -1
- package/docs/errors/SW13001.md +1 -1
- package/docs/errors/SW13003.md +2 -2
- package/docs/errors/SW14001.md +1 -1
- package/docs/errors/SW14003.md +4 -4
- package/docs/errors/SW14004.md +2 -2
- package/docs/errors/SW14005.md +1 -1
- package/docs/errors/SW14006.md +1 -1
- package/docs/errors/SW14007.md +2 -2
- package/docs/errors/SW14008.md +1 -1
- package/docs/errors/SW30001.md +1 -1
- package/docs/errors/SW31001.md +1 -1
- package/docs/errors/SW31004.md +1 -1
- package/docs/errors/SW33005.md +1 -1
- package/docs/errors/SW34002.md +1 -1
- package/docs/errors/SW90001.md +1 -1
- package/docs/errors/SW90005.md +1 -1
- package/docs/errors/SW90006.md +1 -1
- package/docs/errors/index.md +72 -72
- package/docs/formatters.md +5 -5
- package/docs/guides/animations.md +7 -8
- package/docs/guides/design-systems.md +7 -7
- package/docs/guides/element-relationships.md +15 -19
- package/docs/guides/lint-adoption.md +5 -5
- package/docs/guides/migrating-from-css.md +11 -11
- package/docs/guides/migrating-from-tailwind.md +21 -16
- package/docs/guides/recommended-practices.md +18 -18
- package/docs/guides/responsive-styles.md +7 -7
- package/docs/guides/reusable-styles.md +5 -5
- package/docs/guides/runtime-conditions.md +6 -6
- package/docs/guides/style.md +15 -15
- package/docs/guides/tailwind-compatibility.md +27 -21
- package/docs/guides/view-transitions.md +9 -11
- package/docs/guides/web-components.md +4 -4
- package/docs/index.md +14 -12
- package/docs/integrations.md +3 -3
- package/docs/lints/ambiguous-style-base-order.md +2 -2
- package/docs/lints/bypassed-undefinition.md +3 -3
- package/docs/lints/clamped-value.md +1 -1
- package/docs/lints/conflicting-provider-properties.md +2 -2
- package/docs/lints/conflicting-utilities.md +67 -2
- package/docs/lints/document-scoped-selector.md +1 -1
- package/docs/lints/duplicate-definition.md +3 -3
- package/docs/lints/duplicate-utility.md +2 -2
- package/docs/lints/duplicate-view-transition-name.md +3 -3
- package/docs/lints/ignored-definition-condition.md +2 -2
- package/docs/lints/ignored-tailwind-feature.md +3 -3
- package/docs/lints/implicit-nesting-selector.md +2 -2
- package/docs/lints/incompatible-property-value.md +3 -3
- package/docs/lints/incompatible-theme-value.md +1 -1
- package/docs/lints/index.md +74 -74
- package/docs/lints/ineffective-anchor-scope.md +2 -2
- package/docs/lints/interfering-imported-style-base.md +1 -1
- package/docs/lints/invalid-animation-option.md +3 -3
- package/docs/lints/invalid-css-directive.md +3 -3
- package/docs/lints/invalid-css-import.md +2 -2
- package/docs/lints/invalid-css-input.md +4 -4
- package/docs/lints/invalid-cva-config.md +2 -2
- package/docs/lints/invalid-cva-input.md +4 -4
- package/docs/lints/invalid-keyframes-definition.md +2 -2
- package/docs/lints/invalid-keyframes-use.md +2 -2
- package/docs/lints/invalid-keyframes-variant.md +4 -4
- package/docs/lints/invalid-lint-suppression.md +3 -3
- package/docs/lints/invalid-marker-use.md +2 -2
- package/docs/lints/invalid-media-query.md +4 -4
- package/docs/lints/invalid-ref-input.md +4 -4
- package/docs/lints/invalid-rule-group-input.md +2 -2
- package/docs/lints/invalid-runtime-condition.md +3 -3
- package/docs/lints/invalid-stored-variant.md +3 -3
- package/docs/lints/invalid-style-composition.md +2 -2
- package/docs/lints/invalid-style-input.md +2 -2
- package/docs/lints/invalid-theme-reference.md +3 -3
- package/docs/lints/invalid-utility.md +3 -3
- package/docs/lints/invalid-variant.md +2 -2
- package/docs/lints/invalid-view-transition-definition.md +2 -2
- package/docs/lints/invalid-view-transition-use.md +2 -2
- package/docs/lints/invalid-view-transition-variant.md +3 -3
- package/docs/lints/mismatched-framework-import.md +3 -3
- package/docs/lints/missing-document-target.md +2 -2
- package/docs/lints/missing-ref-attachment.md +4 -4
- package/docs/lints/missing-view-transition-name.md +3 -3
- package/docs/lints/mutating-macro-argument.md +2 -2
- package/docs/lints/no-arbitrary-breakpoints.md +2 -2
- package/docs/lints/no-arbitrary-colors.md +2 -2
- package/docs/lints/no-arbitrary-spacing.md +1 -1
- package/docs/lints/no-class-property.md +3 -3
- package/docs/lints/no-important.md +2 -2
- package/docs/lints/no-restricted-declarations.md +1 -1
- package/docs/lints/no-restricted-length-units.md +1 -1
- package/docs/lints/no-restricted-theme-tokens.md +1 -1
- package/docs/lints/no-restricted-utilities.md +2 -2
- package/docs/lints/prefer-canonical-utilities.md +2 -2
- package/docs/lints/prefer-direct-styling.md +3 -3
- package/docs/lints/prefer-logical-properties.md +22 -5
- package/docs/lints/prefer-sorted-utilities.md +2 -2
- package/docs/lints/prefer-typed-relationships.md +3 -3
- package/docs/lints/prefer-typed-variables.md +1 -1
- package/docs/lints/prefer-variant-directive.md +3 -3
- package/docs/lints/redundant-variant.md +2 -2
- package/docs/lints/repeated-nesting-selector.md +2 -2
- package/docs/lints/runtime-condition-requires-css-if.md +3 -3
- package/docs/lints/split-view-transition-class.md +3 -3
- package/docs/lints/suspending-macro-argument.md +2 -2
- package/docs/lints/unknown-utility.md +4 -4
- package/docs/lints/unknown-variant.md +2 -2
- package/docs/lints/unmatched-host-selector.md +2 -2
- package/docs/lints/unsatisfiable-variants.md +1 -1
- package/docs/lints/unused-lint-suppression.md +1 -1
- package/docs/lints/unverified-style-base.md +2 -2
- package/docs/macros/anchor-scope.md +13 -13
- package/docs/macros/css.md +7 -7
- package/docs/macros/cva.md +13 -13
- package/docs/macros/index.md +10 -10
- package/docs/macros/keyframes.md +9 -9
- package/docs/macros/media.md +2 -2
- package/docs/macros/ref/as-anchor.md +11 -11
- package/docs/macros/ref/as-container.md +8 -8
- package/docs/macros/ref/at.md +10 -10
- package/docs/macros/ref/condition.md +8 -8
- package/docs/macros/ref/in.md +11 -11
- package/docs/macros/ref/index.md +16 -16
- package/docs/macros/ref/position-anchor.md +9 -9
- package/docs/macros/style.md +24 -24
- package/docs/macros/view-transition.md +16 -16
- package/docs/macros/when.md +13 -13
- package/docs/plugins/iconify.md +5 -5
- package/docs/plugins/index.md +4 -4
- package/docs/utilities-and-variants.md +6 -6
- package/docs/why.md +13 -15
- package/package.json +8 -6
- package/skills/migrate-to-stillwind/SKILL.md +36 -2
- package/skills/stillwind/SKILL.md +4 -0
package/docs/macros/when.md
CHANGED
|
@@ -6,9 +6,9 @@ description: "Store a variant sequence or alternatives, such as a ref condition,
|
|
|
6
6
|
# style.when()
|
|
7
7
|
|
|
8
8
|
`style.when(...variants)` stores a sequence of variants in a variable. Use the
|
|
9
|
-
variable in [`style()`](style
|
|
9
|
+
variable in [`style()`](https://stillwind.dev/docs/macros/style) where you would write the variants.
|
|
10
10
|
This helps when several elements need the same
|
|
11
|
-
[ref condition](ref/condition
|
|
11
|
+
[ref condition](https://stillwind.dev/docs/macros/ref/condition), because a ref call must otherwise
|
|
12
12
|
be repeated in each `style()` call.
|
|
13
13
|
|
|
14
14
|
## Example
|
|
@@ -32,29 +32,29 @@ export const arrow = style(`${cardHover}:translate-x-1`);
|
|
|
32
32
|
const card = undefined;
|
|
33
33
|
const cardHover = undefined;
|
|
34
34
|
|
|
35
|
-
export const root = {className:"
|
|
36
|
-
export const title = {className:"
|
|
37
|
-
export const arrow = {className:"
|
|
35
|
+
export const root = {className:"sw_1tsgv sw_card_nudp9"};
|
|
36
|
+
export const title = {className:"sw_0m922"};
|
|
37
|
+
export const arrow = {className:"sw_nlo24"};
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
### Generated CSS
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
```css
|
|
44
|
-
.
|
|
44
|
+
.sw_1tsgv {
|
|
45
45
|
border-radius: var(--radius-lg);
|
|
46
46
|
border-style: var(--tw-border-style);
|
|
47
47
|
border-width: 1px;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
@media (hover: hover) {
|
|
51
|
-
.
|
|
51
|
+
.sw_0m922:is(:where(.sw_card_nudp9):hover *) {
|
|
52
52
|
color: var(--color-blue-600);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
@media (hover: hover) {
|
|
57
|
-
.
|
|
57
|
+
.sw_nlo24:is(:where(.sw_card_nudp9):hover *) {
|
|
58
58
|
--tw-translate-x: calc(var(--spacing) * 1);
|
|
59
59
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
60
60
|
}
|
|
@@ -72,8 +72,8 @@ The final colon is optional.
|
|
|
72
72
|
| Form | Example |
|
|
73
73
|
| ------------------------------------------------------------- | --------------------------------------- |
|
|
74
74
|
| A string literal of variants | `style.when("hover:md")` |
|
|
75
|
-
| A [ref condition](ref/condition
|
|
76
|
-
| A [container query](ref/at
|
|
75
|
+
| A [ref condition](https://stillwind.dev/docs/macros/ref/condition), with `.in()` | `style.when(card("hover").in(list))` |
|
|
76
|
+
| A [container query](https://stillwind.dev/docs/macros/ref/at) | `style.when(card.at("width >= 40rem"))` |
|
|
77
77
|
| A template literal whose interpolations are complete variants | ``style.when(`md:${card("hover")}`)`` |
|
|
78
78
|
| Another stored variant | `style.when(cardHover)` |
|
|
79
79
|
|
|
@@ -85,7 +85,7 @@ Write the call as the initial value of a variable, outside other Stillwind
|
|
|
85
85
|
calls. Declare a stored variant before another `style.when()` call uses it.
|
|
86
86
|
A `style()` call can use one that is declared later in the module.
|
|
87
87
|
|
|
88
|
-
[invalid-stored-variant](
|
|
88
|
+
[invalid-stored-variant](https://stillwind.dev/docs/lints/invalid-stored-variant) reports an
|
|
89
89
|
argument that is not a sequence of variants.
|
|
90
90
|
|
|
91
91
|
## Alternatives
|
|
@@ -102,7 +102,7 @@ export const title = style({ [active]: "text-blue-600" });
|
|
|
102
102
|
A use means the same as writing the use once for each argument, in argument
|
|
103
103
|
order. `title` is equal to
|
|
104
104
|
`style({ "hover:": "text-blue-600", [card("focus-within")]: "text-blue-600" })`.
|
|
105
|
-
Unlike an [`or(...)`](
|
|
105
|
+
Unlike an [`or(...)`](https://stillwind.dev/docs/guides/style#match-any-of-several-variants)
|
|
106
106
|
variant, the arguments can be ref conditions and container queries.
|
|
107
107
|
|
|
108
108
|
## Uses
|
|
@@ -119,7 +119,7 @@ refer to one stored variant. A choice at runtime, such as
|
|
|
119
119
|
`[active ? cardHover : cardFocus]`, does not work, because the compiler
|
|
120
120
|
expands the variants at build time. Write a key for each stored variant instead.
|
|
121
121
|
|
|
122
|
-
[`style.cva()`](cva
|
|
122
|
+
[`style.cva()`](https://stillwind.dev/docs/macros/cva) values and [`.in()`](https://stillwind.dev/docs/macros/ref/in)
|
|
123
123
|
do not accept a stored variant.
|
|
124
124
|
|
|
125
125
|
## Output
|
package/docs/plugins/iconify.md
CHANGED
|
@@ -24,7 +24,7 @@ Load the plugin in the project stylesheet:
|
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Use `icon-<set>--<icon>` or `icon-[<set>--<icon>]` to select an icon. Variants
|
|
27
|
-
apply as usual. The [prefer-canonical-utilities](
|
|
27
|
+
apply as usual. The [prefer-canonical-utilities](https://stillwind.dev/docs/lints/prefer-canonical-utilities)
|
|
28
28
|
lint suggests the form without brackets:
|
|
29
29
|
|
|
30
30
|
```tsx
|
|
@@ -44,7 +44,7 @@ To change the height, add a size utility to the same element:
|
|
|
44
44
|
| `icon-(<custom-property>)` | The value of the given custom property |
|
|
45
45
|
|
|
46
46
|
To add a named size, define a `--icon-size-<name>` token in
|
|
47
|
-
[`@theme`](
|
|
47
|
+
[`@theme`](https://stillwind.dev/docs/at-rules/theme). Its value must be a length or a percentage.
|
|
48
48
|
For example, this token adds the `icon-lg` utility:
|
|
49
49
|
|
|
50
50
|
```css
|
|
@@ -73,9 +73,9 @@ needs its own size, so give the size utility the same variant as the icon:
|
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
Size values follow lint policies configured for `height`. For example,
|
|
76
|
-
[no-restricted-length-units](
|
|
76
|
+
[no-restricted-length-units](https://stillwind.dev/docs/lints/no-restricted-length-units) with
|
|
77
77
|
`properties: ["height"]` checks their units, and
|
|
78
|
-
[no-arbitrary-spacing](
|
|
78
|
+
[no-arbitrary-spacing](https://stillwind.dev/docs/lints/no-arbitrary-spacing) with
|
|
79
79
|
`properties: ["height"]` reports arbitrary sizes, but not named sizes such as
|
|
80
80
|
`icon-lg`.
|
|
81
81
|
|
|
@@ -161,7 +161,7 @@ export default defineConfig({
|
|
|
161
161
|
});
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
`iconify()` accepts the options of the [`@plugin`](
|
|
164
|
+
`iconify()` accepts the options of the [`@plugin`](https://stillwind.dev/docs/at-rules/plugin)
|
|
165
165
|
block, with `hashLength` in place of `hash-length`. When both set the same
|
|
166
166
|
option, the `@plugin` block wins.
|
|
167
167
|
|
package/docs/plugins/index.md
CHANGED
|
@@ -6,15 +6,15 @@ description: "Add utilities to your stylesheet with the plugins that the Stillwi
|
|
|
6
6
|
# Official plugins
|
|
7
7
|
|
|
8
8
|
A plugin adds utilities and variants to your stylesheet. Each project that loads
|
|
9
|
-
a plugin can use its definitions in [`style()`](
|
|
9
|
+
a plugin can use its definitions in [`style()`](https://stillwind.dev/docs/macros/style), and the
|
|
10
10
|
editor and the CLI check them like your own definitions.
|
|
11
11
|
|
|
12
12
|
| Plugin | Adds |
|
|
13
13
|
| ---------------------------------------------------- | -------------------------- |
|
|
14
|
-
| [`@stillwind/plugin-iconify`](iconify
|
|
14
|
+
| [`@stillwind/plugin-iconify`](https://stillwind.dev/docs/plugins/iconify) | Iconify icons as utilities |
|
|
15
15
|
|
|
16
16
|
Install the package, and load it in your stylesheet with
|
|
17
|
-
[`@plugin`](
|
|
17
|
+
[`@plugin`](https://stillwind.dev/docs/at-rules/plugin):
|
|
18
18
|
|
|
19
19
|
```css
|
|
20
20
|
@import "stillwind";
|
|
@@ -22,5 +22,5 @@ Install the package, and load it in your stylesheet with
|
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
Tailwind CSS v4 JavaScript plugins use the same statement.
|
|
25
|
-
[Tailwind CSS compatibility](
|
|
25
|
+
[Tailwind CSS compatibility](https://stillwind.dev/docs/guides/tailwind-compatibility) lists the tested
|
|
26
26
|
plugins.
|
|
@@ -20,7 +20,7 @@ CSS declarations names the declaration that it comes from. A variant result
|
|
|
20
20
|
shows where the variant places the declarations of a utility.
|
|
21
21
|
|
|
22
22
|
The results leave out the theme variables and other supporting CSS that the full
|
|
23
|
-
stylesheet contains. The [macro reference](macros
|
|
23
|
+
stylesheet contains. The [macro reference](https://stillwind.dev/docs/macros) shows complete
|
|
24
24
|
generated stylesheets.
|
|
25
25
|
|
|
26
26
|
A declaration without a matching utility becomes an arbitrary property, such as
|
|
@@ -31,22 +31,22 @@ does, so compare its declarations with your CSS before you replace it.
|
|
|
31
31
|
|
|
32
32
|
The lookup runs the Stillwind compiler in your browser with the default theme.
|
|
33
33
|
It downloads the compiler when the page opens. Utilities from your own
|
|
34
|
-
[`@theme`](at-rules/theme
|
|
35
|
-
See [Design systems](guides/design-systems
|
|
34
|
+
[`@theme`](https://stillwind.dev/docs/at-rules/theme) tokens, such as `bg-brand`, do not resolve here.
|
|
35
|
+
See [Design systems](https://stillwind.dev/docs/guides/design-systems) to add them. To check a utility
|
|
36
36
|
in your project, hover over it in the editor or run `stillwind utilities`.
|
|
37
37
|
|
|
38
38
|
The built-in utilities and variants follow Tailwind CSS, so see the
|
|
39
39
|
[Tailwind CSS documentation](https://tailwindcss.com/docs) for their usage.
|
|
40
|
-
[Tailwind CSS compatibility](guides/tailwind-compatibility
|
|
40
|
+
[Tailwind CSS compatibility](https://stillwind.dev/docs/guides/tailwind-compatibility#what-stillwind-adds)
|
|
41
41
|
lists what Stillwind adds.
|
|
42
42
|
|
|
43
43
|
The editor and the CLI report non-canonical spellings with
|
|
44
|
-
[prefer-canonical-utilities](lints/prefer-canonical-utilities
|
|
44
|
+
[prefer-canonical-utilities](https://stillwind.dev/docs/lints/prefer-canonical-utilities).
|
|
45
45
|
|
|
46
46
|
## Look up names from the command line
|
|
47
47
|
|
|
48
48
|
The lookup needs a browser. In a terminal or a coding agent, the
|
|
49
|
-
[CLI](cli
|
|
49
|
+
[CLI](https://stillwind.dev/docs/cli#stillwind-utilities) shows the CSS of utilities and variants:
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
52
|
vp exec stillwind utilities p-4 hover:underline
|
package/docs/why.md
CHANGED
|
@@ -34,7 +34,7 @@ lint: {
|
|
|
34
34
|
},
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
To use a breakpoint in JavaScript, call [`style.media()`](macros/media
|
|
37
|
+
To use a breakpoint in JavaScript, call [`style.media()`](https://stillwind.dev/docs/macros/media) with its name. You do
|
|
38
38
|
not need to copy the breakpoint value into your code.
|
|
39
39
|
|
|
40
40
|
## Connect elements through variables
|
|
@@ -43,14 +43,13 @@ Tailwind connects elements by name: `group/card` on the parent and
|
|
|
43
43
|
`group-hover/card:` on the child. Tailwind reads these names as strings, so it
|
|
44
44
|
does not check that the two names agree.
|
|
45
45
|
|
|
46
|
-
In Stillwind, you create the name as a variable with [`style.ref()`](macros/ref
|
|
46
|
+
In Stillwind, you create the name as a variable with [`style.ref()`](https://stillwind.dev/docs/macros/ref):
|
|
47
47
|
|
|
48
48
|
```tsx
|
|
49
49
|
import { style } from "stillwind/react";
|
|
50
50
|
|
|
51
|
-
const card = style.ref("card");
|
|
52
|
-
|
|
53
51
|
export function Card() {
|
|
52
|
+
const card = style.ref("card");
|
|
54
53
|
return (
|
|
55
54
|
<article {...style(card, "rounded-lg p-4")}>
|
|
56
55
|
<h2 {...style({ [card("hover")]: "text-blue-600" })}>Project</h2>
|
|
@@ -74,12 +73,11 @@ In Stillwind, you define them in the component that uses them:
|
|
|
74
73
|
```tsx
|
|
75
74
|
import { style } from "stillwind/react";
|
|
76
75
|
|
|
77
|
-
const enter = style.keyframes({
|
|
78
|
-
from: "opacity-0",
|
|
79
|
-
to: "opacity-100",
|
|
80
|
-
});
|
|
81
|
-
|
|
82
76
|
export function Notice() {
|
|
77
|
+
const enter = style.keyframes({
|
|
78
|
+
from: "opacity-0",
|
|
79
|
+
to: "opacity-100",
|
|
80
|
+
});
|
|
83
81
|
return <aside {...style(enter("duration-300"))}>Your changes are saved.</aside>;
|
|
84
82
|
}
|
|
85
83
|
```
|
|
@@ -114,21 +112,21 @@ stillwind fmt
|
|
|
114
112
|
```
|
|
115
113
|
|
|
116
114
|
AI agents can run the same commands as you, and CI can run them on every change.
|
|
117
|
-
The [VS Code extension](editors
|
|
115
|
+
The [VS Code extension](https://stillwind.dev/docs/editors) shows the same findings while you edit.
|
|
118
116
|
|
|
119
117
|
## Ship static CSS
|
|
120
118
|
|
|
121
119
|
The compiler turns static utilities into CSS files and class names at build time.
|
|
122
120
|
These styles need no JavaScript at runtime. Conditions and dynamic values add
|
|
123
121
|
only the small runtime helpers that they use. See
|
|
124
|
-
[How styles compile](concepts/how-styles-compile
|
|
122
|
+
[How styles compile](https://stillwind.dev/docs/concepts/how-styles-compile) for the generated code.
|
|
125
123
|
|
|
126
124
|
## What changes from Tailwind
|
|
127
125
|
|
|
128
126
|
Stillwind supports Tailwind CSS v4 utilities, variants, and plugins. You write
|
|
129
127
|
them in a different place:
|
|
130
128
|
|
|
131
|
-
- You pass utilities to [`style()`](guides/style
|
|
129
|
+
- You pass utilities to [`style()`](https://stillwind.dev/docs/guides/style) and spread the result onto
|
|
132
130
|
the element, instead of writing a `className` string.
|
|
133
131
|
- Stillwind needs a build tool. It supports Vite, Astro, Next.js, SvelteKit,
|
|
134
132
|
Nuxt, webpack, Rspack, Rsbuild, and Turbopack.
|
|
@@ -136,9 +134,9 @@ them in a different place:
|
|
|
136
134
|
|
|
137
135
|
Tailwind CSS remains the better fit when a project has no build tool, or when
|
|
138
136
|
classes come from places that Stillwind does not compile, such as HTML from a
|
|
139
|
-
CMS. [Tailwind CSS compatibility](guides/tailwind-compatibility
|
|
137
|
+
CMS. [Tailwind CSS compatibility](https://stillwind.dev/docs/guides/tailwind-compatibility) lists the
|
|
140
138
|
tested plugins and the differences.
|
|
141
139
|
|
|
142
|
-
[Getting started](
|
|
143
|
-
[Migrating from Tailwind CSS](guides/migrating-from-tailwind
|
|
140
|
+
[Getting started](https://stillwind.dev/docs) adds Stillwind to a new application.
|
|
141
|
+
[Migrating from Tailwind CSS](https://stillwind.dev/docs/guides/migrating-from-tailwind) moves an
|
|
144
142
|
existing Tailwind project.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stillwind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Write Tailwind CSS v4 utilities in components, enforce your design system, and ship static CSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"alpinejs",
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
"css",
|
|
44
44
|
"docs",
|
|
45
45
|
"skills",
|
|
46
|
+
"README.md",
|
|
47
|
+
"CHANGELOG.md",
|
|
46
48
|
"AGENTS_TEMPLATE.md",
|
|
47
49
|
"TAILWINDCSS-MIT-LICENSE"
|
|
48
50
|
],
|
|
@@ -130,17 +132,17 @@
|
|
|
130
132
|
"./package.json": "./package.json"
|
|
131
133
|
},
|
|
132
134
|
"dependencies": {
|
|
133
|
-
"@stillwind/config": "0.
|
|
134
|
-
"@stillwind/native": "0.
|
|
135
|
-
"@stillwind/projection": "0.
|
|
135
|
+
"@stillwind/config": "0.10.0",
|
|
136
|
+
"@stillwind/native": "0.10.0",
|
|
137
|
+
"@stillwind/projection": "0.10.0"
|
|
136
138
|
},
|
|
137
139
|
"devDependencies": {
|
|
138
140
|
"@stillwind-internal/tools-workspace": "0.0.0",
|
|
139
141
|
"@types/node": "^26.6.6",
|
|
140
142
|
"lit": "^3.3.3",
|
|
141
143
|
"typescript": "^6.0.3",
|
|
142
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@1.
|
|
143
|
-
"vite-plus": "1.
|
|
144
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.6.0",
|
|
145
|
+
"vite-plus": "1.6.0"
|
|
144
146
|
},
|
|
145
147
|
"peerDependencies": {
|
|
146
148
|
"lit": "^3.3.0"
|
|
@@ -65,7 +65,40 @@ next steps.
|
|
|
65
65
|
|
|
66
66
|
Do not change the look of the pages beyond the chosen level without asking.
|
|
67
67
|
Do not add suppression comments or relax the `lint` setting to pass the checks
|
|
68
|
-
unless the user agrees.
|
|
68
|
+
unless the user agrees. Plugin base classes are an exception, as the next
|
|
69
|
+
section describes.
|
|
70
|
+
|
|
71
|
+
### Conflicts with plugin classes
|
|
72
|
+
|
|
73
|
+
`conflicting-utilities` can report two classes of a plugin or CSS package, or a
|
|
74
|
+
plugin class and a core utility. Decide from the plugin's own usage whether the
|
|
75
|
+
pair is intended:
|
|
76
|
+
|
|
77
|
+
- The pair is intended when the plugin's documentation or examples put both
|
|
78
|
+
classes on the same element, and one class is meant to change the other. For
|
|
79
|
+
example, daisyUI combines the base class `btn` with `btn-outline`, and
|
|
80
|
+
`@tailwindcss/forms` combines `form-input` with `px-4`. Check the
|
|
81
|
+
documentation of the installed version, because class names and CSS change
|
|
82
|
+
between versions.
|
|
83
|
+
- The pair is a real conflict when the classes are alternatives, such as two
|
|
84
|
+
modifiers of one kind (`btn-outline btn-ghost`) or two values (`p-2 p-4`), or
|
|
85
|
+
when the plugin uses them on different elements, such as a container class and
|
|
86
|
+
a class for its child. Fix the code instead.
|
|
87
|
+
|
|
88
|
+
For an intended pair, change the `conflicting-utilities` options in
|
|
89
|
+
`stillwind.config.ts`. You do not need to ask first, but report each change.
|
|
90
|
+
|
|
91
|
+
- When the finding has a note that names `allowShorthandOverrides`, the pair is a
|
|
92
|
+
shorthand and a longhand, such as `animation` and `animation-duration`. Set
|
|
93
|
+
`allowShorthandOverrides: true`.
|
|
94
|
+
- Otherwise, add the base class to `ignoredUtilities`. Write its full name, such
|
|
95
|
+
as `btn`. Use a glob such as `form-*` only when every class that it matches is
|
|
96
|
+
a base class, because the rule stops reporting every pair of a matching class.
|
|
97
|
+
- The "Plugins" section of `docs/lints/conflicting-utilities.md` lists the
|
|
98
|
+
settings for tested plugins. Use them as examples, and still check each pair
|
|
99
|
+
against the installed version.
|
|
100
|
+
|
|
101
|
+
When the plugin's usage does not tell whether a pair is intended, ask the user.
|
|
69
102
|
|
|
70
103
|
## Verify
|
|
71
104
|
|
|
@@ -84,5 +117,6 @@ unless the user agrees.
|
|
|
84
117
|
the project's instruction file, such as `AGENTS.md` or `CLAUDE.md`. Ask
|
|
85
118
|
before you create or change the file, and keep its other content.
|
|
86
119
|
- Report the chosen level, the changes, the verification results, and what
|
|
87
|
-
remains:
|
|
120
|
+
remains: the `lint` options that you changed for plugin classes and the pairs
|
|
121
|
+
that they allow, unresolved findings, plugins that did not work, code that you left
|
|
88
122
|
unchanged, and the work for the next level. Do not commit unless the user asks.
|
|
@@ -66,4 +66,8 @@ Markdown version of each page.
|
|
|
66
66
|
the `docs` field of a finding names that page. Do not add a suppression comment or
|
|
67
67
|
relax the `lint` setting unless the user agrees. A suppression comment names the rule
|
|
68
68
|
and gives the reason after `--`.
|
|
69
|
+
- When `conflicting-utilities` reports a pair of classes from a plugin or CSS package,
|
|
70
|
+
follow "Conflicts with plugin classes" in `../migrate-to-stillwind/SKILL.md`. For a
|
|
71
|
+
pair that the plugin intends, you can change the rule options without asking first,
|
|
72
|
+
and you report the change.
|
|
69
73
|
- Check the result in the browser when a change can affect the layout.
|