stillwind 0.13.0 → 0.14.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 +21 -0
- package/docs/at-rules/apply.md +1 -1
- package/docs/at-rules/custom-variant.md +1 -1
- package/docs/at-rules/slot.md +1 -1
- package/docs/at-rules/stillwind-property.md +1 -1
- package/docs/at-rules/stillwind-registry.md +1 -1
- package/docs/at-rules/stillwind-require-properties.md +1 -1
- package/docs/at-rules/stillwind-undef-arbitrary-property.md +1 -1
- package/docs/at-rules/stillwind-undef-utility.md +1 -1
- package/docs/at-rules/stillwind-undef-variant.md +1 -1
- package/docs/at-rules/theme.md +5 -5
- package/docs/at-rules/utility.md +4 -4
- package/docs/at-rules/variant.md +1 -1
- package/docs/concepts/css-ordering.md +3 -2
- package/docs/errors/SW11001.md +4 -2
- package/docs/errors/index.md +0 -1
- package/docs/guides/style.md +1 -4
- package/docs/lints/ambiguous-style-base-order.md +3 -1
- package/docs/lints/conflicting-provider-properties.md +3 -0
- package/docs/lints/cyclic-style-order.md +12 -5
- package/docs/lints/interfering-imported-style-base.md +13 -22
- package/docs/llms.txt +0 -1
- package/package.json +5 -5
- package/docs/errors/SW11002.md +0 -65
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# stillwind
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Two modules that build styles on bases from each other now compile when the styles themselves do not form a cycle. Previously this failed the build with SW11002, which is removed. Stillwind keeps one of the module orders, as it already did for files that import components from each other.
|
|
8
|
+
|
|
9
|
+
`cyclic-style-order` now reports a cycle only when the files on it set the same property under the same CSS variants. A cycle between files that set different properties, such as mutually recursive `Tree` and `TreeItem` components, is no longer reported, because the order does not change any value. The finding now names the competing properties.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- `interfering-imported-style-base`, `ambiguous-style-base-order`, and `conflicting-provider-properties` no longer report a style that overrides a property of a style that it is built on. For example, `style(base, "p-4")` with an imported `base` that sets padding, and `style(base, "@container")` with a `base` that calls `asContainer()`, are no longer reported. Two bases are also no longer reported when one of them sets the property on top of a style that the other base is built on. These rules still report bases whose order the code does not decide.
|
|
14
|
+
|
|
15
|
+
- Stillwind now uses the CSS property data of `@webref/css` 8.8.0 instead of 8.7.8. Stillwind reads this data to know which CSS properties exist and which longhands a shorthand sets, so it decides with this data which declarations compete when styles are combined.
|
|
16
|
+
|
|
17
|
+
The update adds these properties: `environment`, `environment-intensity`, `environment-map`, `environment-rotate`, `front-limit`, `inset-back`, `inset-bottom`, `inset-front`, `inset-left`, `inset-right`, `inset-top`, `overscroll-container-type`, `portal-action`, `portal-stage`, `portal-transform`, `position-context`, `spatial`, `text-autospace-size`, `z-align-items`, and `z-align-self`. For example, `inset-top` now competes with `top`.
|
|
18
|
+
|
|
19
|
+
- Updated dependencies:
|
|
20
|
+
- @stillwind/config@0.14.0
|
|
21
|
+
- @stillwind/native@0.14.0
|
|
22
|
+
- @stillwind/projection@0.14.0
|
|
23
|
+
|
|
3
24
|
## 0.13.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/docs/at-rules/apply.md
CHANGED
|
@@ -27,7 +27,7 @@ inside a style rule or a utility definition. Whitespace separates the utilities.
|
|
|
27
27
|
### Generated stylesheet without preflight
|
|
28
28
|
|
|
29
29
|
```css
|
|
30
|
-
/*! stillwind v0.
|
|
30
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
31
31
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
32
32
|
@layer properties, theme, base, components, utilities;
|
|
33
33
|
|
|
@@ -54,7 +54,7 @@ export const link = {className:"sw_77cu9"};
|
|
|
54
54
|
### Generated stylesheet without preflight
|
|
55
55
|
|
|
56
56
|
```css
|
|
57
|
-
/*! stillwind v0.
|
|
57
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
58
58
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
59
59
|
@layer properties, theme, base, components, utilities;
|
|
60
60
|
|
package/docs/at-rules/slot.md
CHANGED
|
@@ -42,7 +42,7 @@ export const link = {className:"sw_77qpw"};
|
|
|
42
42
|
### Generated stylesheet without preflight
|
|
43
43
|
|
|
44
44
|
```css
|
|
45
|
-
/*! stillwind v0.
|
|
45
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
46
46
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
47
47
|
@layer properties, theme, base, components, utilities;
|
|
48
48
|
|
|
@@ -52,7 +52,7 @@ export const icon = {className:"sw_wou1b"};
|
|
|
52
52
|
### Generated stylesheet without preflight
|
|
53
53
|
|
|
54
54
|
```css
|
|
55
|
-
/*! stillwind v0.
|
|
55
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
56
56
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
57
57
|
@layer properties, theme, base, components, utilities;
|
|
58
58
|
|
|
@@ -62,7 +62,7 @@ export const panel = {className:"sw_fd678"};
|
|
|
62
62
|
### Generated stylesheet without preflight
|
|
63
63
|
|
|
64
64
|
```css
|
|
65
|
-
/*! stillwind v0.
|
|
65
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
66
66
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
67
67
|
@layer properties, theme, base, components, utilities;
|
|
68
68
|
|
|
@@ -54,7 +54,7 @@ export const icon = {className:"sw_wou1b"};
|
|
|
54
54
|
### Generated stylesheet without preflight
|
|
55
55
|
|
|
56
56
|
```css
|
|
57
|
-
/*! stillwind v0.
|
|
57
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
58
58
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
59
59
|
@layer properties, theme, base, components, utilities;
|
|
60
60
|
|
|
@@ -45,7 +45,7 @@ export const accepted = {className:"sw_a2es4"};
|
|
|
45
45
|
### Generated stylesheet without preflight
|
|
46
46
|
|
|
47
47
|
```css
|
|
48
|
-
/*! stillwind v0.
|
|
48
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
49
49
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
50
50
|
@layer properties, theme, base, components, utilities;
|
|
51
51
|
|
|
@@ -48,7 +48,7 @@ export const replaced = {className:"sw_vtxcq"};
|
|
|
48
48
|
### Generated stylesheet without preflight
|
|
49
49
|
|
|
50
50
|
```css
|
|
51
|
-
/*! stillwind v0.
|
|
51
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
52
52
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
53
53
|
@layer properties, theme, base, components, utilities;
|
|
54
54
|
|
|
@@ -42,7 +42,7 @@ export const toolbar = {};
|
|
|
42
42
|
### Generated stylesheet without preflight
|
|
43
43
|
|
|
44
44
|
```css
|
|
45
|
-
/*! stillwind v0.
|
|
45
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
46
46
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
47
47
|
@layer properties, theme, base, components, utilities;
|
|
48
48
|
```
|
package/docs/at-rules/theme.md
CHANGED
|
@@ -44,7 +44,7 @@ export const card = {className:"sw_4rosj"};
|
|
|
44
44
|
### Generated stylesheet without preflight
|
|
45
45
|
|
|
46
46
|
```css
|
|
47
|
-
/*! stillwind v0.
|
|
47
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
48
48
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
49
49
|
@layer properties, theme, base, components, utilities;
|
|
50
50
|
|
|
@@ -110,7 +110,7 @@ export const label = {className:"sw_cum60"};
|
|
|
110
110
|
### Generated stylesheet without preflight
|
|
111
111
|
|
|
112
112
|
```css
|
|
113
|
-
/*! stillwind v0.
|
|
113
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
114
114
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
115
115
|
@layer properties, theme, base, components, utilities;
|
|
116
116
|
|
|
@@ -163,7 +163,7 @@ export const title = {className:"sw_suzvk"};
|
|
|
163
163
|
### Generated stylesheet without preflight
|
|
164
164
|
|
|
165
165
|
```css
|
|
166
|
-
/*! stillwind v0.
|
|
166
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
167
167
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
168
168
|
@layer properties, theme, base, components, utilities;
|
|
169
169
|
|
|
@@ -216,7 +216,7 @@ export const done = {className:"sw_wpj78"};
|
|
|
216
216
|
### Generated stylesheet without preflight
|
|
217
217
|
|
|
218
218
|
```css
|
|
219
|
-
/*! stillwind v0.
|
|
219
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
220
220
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
221
221
|
@layer properties, theme, base, components, utilities;
|
|
222
222
|
|
|
@@ -269,7 +269,7 @@ export const page = {className:"sw_6kn82"};
|
|
|
269
269
|
### Generated stylesheet without preflight
|
|
270
270
|
|
|
271
271
|
```css
|
|
272
|
-
/*! stillwind v0.
|
|
272
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
273
273
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
274
274
|
@layer properties, theme, base, components, utilities;
|
|
275
275
|
|
package/docs/at-rules/utility.md
CHANGED
|
@@ -61,7 +61,7 @@ export const list = {className:"sw_l0qhr"};
|
|
|
61
61
|
### Generated stylesheet without preflight
|
|
62
62
|
|
|
63
63
|
```css
|
|
64
|
-
/*! stillwind v0.
|
|
64
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
65
65
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
66
66
|
@layer properties, theme, base, components, utilities;
|
|
67
67
|
|
|
@@ -126,7 +126,7 @@ export const code = {className:"sw_vqs03"};
|
|
|
126
126
|
### Generated stylesheet without preflight
|
|
127
127
|
|
|
128
128
|
```css
|
|
129
|
-
/*! stillwind v0.
|
|
129
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
130
130
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
131
131
|
@layer properties, theme, base, components, utilities;
|
|
132
132
|
|
|
@@ -182,7 +182,7 @@ export const page = {className:"sw_z5acf"};
|
|
|
182
182
|
### Generated stylesheet without preflight
|
|
183
183
|
|
|
184
184
|
```css
|
|
185
|
-
/*! stillwind v0.
|
|
185
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
186
186
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
187
187
|
@layer properties, theme, base, components, utilities;
|
|
188
188
|
|
|
@@ -307,7 +307,7 @@ export const icon = {className:"sw_xg0pi"};
|
|
|
307
307
|
### Generated stylesheet without preflight
|
|
308
308
|
|
|
309
309
|
```css
|
|
310
|
-
/*! stillwind v0.
|
|
310
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
311
311
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
312
312
|
@layer properties, theme, base, components, utilities;
|
|
313
313
|
|
package/docs/at-rules/variant.md
CHANGED
|
@@ -39,7 +39,7 @@ body, that element is the one that uses the utility.
|
|
|
39
39
|
### Generated stylesheet without preflight
|
|
40
40
|
|
|
41
41
|
```css
|
|
42
|
-
/*! stillwind v0.
|
|
42
|
+
/*! stillwind v0.14.0 | MIT License | https://stillwind.dev */
|
|
43
43
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
44
44
|
@layer properties, theme, base, components, utilities;
|
|
45
45
|
|
|
@@ -128,8 +128,9 @@ It does not add the component's CSS to a stylesheet that does not include the
|
|
|
128
128
|
component.
|
|
129
129
|
|
|
130
130
|
When two files import values from each other, directly or through other
|
|
131
|
-
files, both orders cannot hold. Stillwind keeps one of them
|
|
132
|
-
[cyclic-style-order](https://stillwind.dev/docs/lints/cyclic-style-order)
|
|
131
|
+
files, both orders cannot hold. Stillwind keeps one of them. When the files
|
|
132
|
+
set the same property, [cyclic-style-order](https://stillwind.dev/docs/lints/cyclic-style-order)
|
|
133
|
+
reports the cycle.
|
|
133
134
|
|
|
134
135
|
### Within one call, conditional rules come last
|
|
135
136
|
|
package/docs/errors/SW11001.md
CHANGED
|
@@ -33,5 +33,7 @@ const second = style(base);
|
|
|
33
33
|
- If only one style extends the other, keep that dependency and remove the one
|
|
34
34
|
in the opposite direction.
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
Two modules that build styles on each other's bases compile when the styles
|
|
37
|
+
themselves do not form a cycle.
|
|
38
|
+
[cyclic-style-order](https://stillwind.dev/docs/lints/cyclic-style-order) reports such modules when
|
|
39
|
+
they set the same property.
|
package/docs/errors/index.md
CHANGED
|
@@ -38,7 +38,6 @@ The first digits of a code tell you what to do next:
|
|
|
38
38
|
- [SW10005](https://stillwind.dev/docs/errors/SW10005): Untransformed macro reference
|
|
39
39
|
- [SW10006](https://stillwind.dev/docs/errors/SW10006): Unavailable style.forward()
|
|
40
40
|
- [SW11001](https://stillwind.dev/docs/errors/SW11001): Style composition cycle
|
|
41
|
-
- [SW11002](https://stillwind.dev/docs/errors/SW11002): CSS module ordering cycle
|
|
42
41
|
- [SW11003](https://stillwind.dev/docs/errors/SW11003): Unavailable style base
|
|
43
42
|
- [SW12001](https://stillwind.dev/docs/errors/SW12001): Incompatible declaration assignment
|
|
44
43
|
- [SW12002](https://stillwind.dev/docs/errors/SW12002): Declaration identities unavailable
|
package/docs/guides/style.md
CHANGED
|
@@ -146,10 +146,7 @@ export function DeleteButton() {
|
|
|
146
146
|
In this example, `dangerButton` has a red background because both background
|
|
147
147
|
rules use equally specific selectors. The order of the class names does not
|
|
148
148
|
affect the result. You can export a stored style and use it in other modules.
|
|
149
|
-
|
|
150
|
-
style, [interfering-imported-style-base](https://stillwind.dev/docs/lints/interfering-imported-style-base)
|
|
151
|
-
reports the call. Define the overriding style in the module that defines the
|
|
152
|
-
base, and import that style instead.
|
|
149
|
+
Utilities that another module adds to the imported style win in the same way.
|
|
153
150
|
|
|
154
151
|
The order of the arguments does not affect the result either.
|
|
155
152
|
`style("bg-red-600", button)` also produces a red background, and
|
|
@@ -37,7 +37,9 @@ export const props = style(second);
|
|
|
37
37
|
utilities always win.
|
|
38
38
|
- Or remove the property from one of the bases.
|
|
39
39
|
|
|
40
|
-
Bases that set different properties do not need this.
|
|
40
|
+
Bases that set different properties do not need this. The rule also does not
|
|
41
|
+
report a property that one base sets on top of a style that the other base is
|
|
42
|
+
built on, because that base wins.
|
|
41
43
|
|
|
42
44
|
## Rule settings
|
|
43
45
|
|
|
@@ -11,6 +11,9 @@ on the same element. For example, `asContainer("size")` sets
|
|
|
11
11
|
`container-type: size`, and `@container` sets it to `inline-size`. Only one
|
|
12
12
|
value takes effect, and the code does not show which.
|
|
13
13
|
|
|
14
|
+
The rule does not report a call that overrides a property of its base style.
|
|
15
|
+
The CSS of the call comes after the CSS of the base, so the call wins.
|
|
16
|
+
|
|
14
17
|
## Reported
|
|
15
18
|
|
|
16
19
|
```tsx
|
|
@@ -7,13 +7,18 @@ description: "Reports files that import values from each other, so their CSS ord
|
|
|
7
7
|
|
|
8
8
|
This rule reports a file whose CSS must come after another file's CSS, while
|
|
9
9
|
that file's CSS must also come after this file, directly or through other
|
|
10
|
-
files. A file must come after another
|
|
11
|
-
such as a component or a base style,
|
|
10
|
+
files, and both files set the same property. A file must come after another
|
|
11
|
+
file when it imports and uses a value, such as a component or a base style,
|
|
12
|
+
that the other file declares. See
|
|
12
13
|
[CSS ordering](https://stillwind.dev/docs/concepts/css-ordering#files-that-pass-styles-to-components).
|
|
13
14
|
|
|
14
15
|
When the order forms a cycle, Stillwind keeps one of the orders, and the build
|
|
15
|
-
continues. The utilities that a caller passes to a component
|
|
16
|
-
the
|
|
16
|
+
continues. The utilities that a caller passes to a component, or that a style
|
|
17
|
+
adds to its base, can then lose to the utilities of the other file.
|
|
18
|
+
|
|
19
|
+
The rule does not report a cycle between files that set different properties,
|
|
20
|
+
such as mutually recursive `Tree` and `TreeItem` components that set different
|
|
21
|
+
properties. The order between such files does not change any value.
|
|
17
22
|
|
|
18
23
|
## Reported
|
|
19
24
|
|
|
@@ -39,12 +44,14 @@ export function Button(props: ButtonProps) {
|
|
|
39
44
|
}
|
|
40
45
|
```
|
|
41
46
|
|
|
42
|
-
`card.tsx` imports `Button`, and `button.tsx` imports `Card`.
|
|
47
|
+
`card.tsx` imports `Button`, and `button.tsx` imports `Card`. Both files set
|
|
48
|
+
`padding`.
|
|
43
49
|
|
|
44
50
|
## How to fix
|
|
45
51
|
|
|
46
52
|
- Move the shared parts to a file that neither file imports from, so that the
|
|
47
53
|
imports go in one direction.
|
|
54
|
+
- Or remove the property from the styles of one file.
|
|
48
55
|
- Or remove the import in one direction, for example by passing the component
|
|
49
56
|
as a prop or a slot.
|
|
50
57
|
|
|
@@ -6,13 +6,11 @@ description: "Reports an imported base style that sets the same property as anot
|
|
|
6
6
|
# interfering-imported-style-base
|
|
7
7
|
|
|
8
8
|
This rule reports a base style from another module that sets the same property as
|
|
9
|
-
another base
|
|
10
|
-
|
|
9
|
+
another base in the call, when neither base is built on the other. The order of
|
|
10
|
+
the arguments does not decide which base wins.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- An imported base and a utility of the call set the same property. The utility of
|
|
15
|
-
the call wins, but the rule still reports the call.
|
|
12
|
+
A utility of the call can override an imported base. Its CSS always comes after
|
|
13
|
+
the CSS of the base, so the rule does not report it.
|
|
16
14
|
|
|
17
15
|
## Project files
|
|
18
16
|
|
|
@@ -20,7 +18,6 @@ reports both cases:
|
|
|
20
18
|
import { style } from "stillwind/react";
|
|
21
19
|
export const first = style("p-2");
|
|
22
20
|
export const second = style("p-4");
|
|
23
|
-
export const combined = style(first, "p-4");
|
|
24
21
|
```
|
|
25
22
|
|
|
26
23
|
## Reported
|
|
@@ -28,7 +25,6 @@ export const combined = style(first, "p-4");
|
|
|
28
25
|
```tsx
|
|
29
26
|
import { first, second } from "./bases";
|
|
30
27
|
export const props = style(first, second);
|
|
31
|
-
export const padded = style(first, "p-4");
|
|
32
28
|
```
|
|
33
29
|
|
|
34
30
|
> interfering-imported-style-base: the base in `bases.ts` overlaps these declarations: `padding`
|
|
@@ -37,30 +33,25 @@ export const padded = style(first, "p-4");
|
|
|
37
33
|
>
|
|
38
34
|
> reordering the style() arguments does not change which declaration wins
|
|
39
35
|
|
|
40
|
-
> interfering-imported-style-base: the base in `bases.ts` overlaps these declarations: `padding`
|
|
41
|
-
>
|
|
42
|
-
> Example:3:23
|
|
43
|
-
>
|
|
44
|
-
> reordering the style() arguments does not change which declaration wins
|
|
45
|
-
|
|
46
36
|
## Fixed
|
|
47
37
|
|
|
48
38
|
```tsx
|
|
49
|
-
import {
|
|
50
|
-
export const props = style(
|
|
39
|
+
import { first } from "./bases";
|
|
40
|
+
export const props = style(first, "p-4");
|
|
51
41
|
```
|
|
52
42
|
|
|
53
|
-
|
|
54
|
-
in the module that defines `first`.
|
|
43
|
+
The call sets `p-4` on top of `first`, so its padding always wins.
|
|
55
44
|
|
|
56
45
|
## How to fix
|
|
57
46
|
|
|
58
|
-
-
|
|
59
|
-
|
|
47
|
+
- Keep the base whose other properties you need, and write the overriding
|
|
48
|
+
utility in the call, as in the example.
|
|
49
|
+
- Or, in the module that defines the styles, build the overriding style on the
|
|
50
|
+
other one, such as `style(first, "p-4")`. Then import that style.
|
|
60
51
|
- Or remove the property from one of the styles.
|
|
61
52
|
|
|
62
|
-
Reordering the arguments does not fix it. `style(
|
|
63
|
-
|
|
53
|
+
Reordering the arguments does not fix it. `style(second, first)` produces the
|
|
54
|
+
same CSS and the same finding.
|
|
64
55
|
|
|
65
56
|
## Rule settings
|
|
66
57
|
|
package/docs/llms.txt
CHANGED
|
@@ -58,7 +58,6 @@ Index of the Markdown pages bundled in `docs/`. Paths are relative to this file.
|
|
|
58
58
|
- [SW10005: Untransformed macro reference](errors/SW10005.md): The style function is used as a value instead of being called.
|
|
59
59
|
- [SW10006: Unavailable style.forward()](errors/SW10006.md): style.forward() is used through an entrypoint that does not provide it.
|
|
60
60
|
- [SW11001: Style composition cycle](errors/SW11001.md): Two styles use each other as a base.
|
|
61
|
-
- [SW11002: CSS module ordering cycle](errors/SW11002.md): Two modules each build styles on a base from the other module.
|
|
62
61
|
- [SW11003: Unavailable style base](errors/SW11003.md): The compiled CSS of a base style is missing from the build.
|
|
63
62
|
- [SW12001: Incompatible declaration assignment](errors/SW12001.md): A variable that holds one ref or animation is assigned a different one.
|
|
64
63
|
- [SW12002: Declaration identities unavailable](errors/SW12002.md): The compiler cannot tell which refs or animations a value can hold.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stillwind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.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",
|
|
@@ -132,13 +132,13 @@
|
|
|
132
132
|
"./package.json": "./package.json"
|
|
133
133
|
},
|
|
134
134
|
"dependencies": {
|
|
135
|
-
"@stillwind/config": "0.
|
|
136
|
-
"@stillwind/native": "0.
|
|
137
|
-
"@stillwind/projection": "0.
|
|
135
|
+
"@stillwind/config": "0.14.0",
|
|
136
|
+
"@stillwind/native": "0.14.0",
|
|
137
|
+
"@stillwind/projection": "0.14.0"
|
|
138
138
|
},
|
|
139
139
|
"devDependencies": {
|
|
140
140
|
"@stillwind-internal/tools-workspace": "0.0.0",
|
|
141
|
-
"@types/node": "^26.6.
|
|
141
|
+
"@types/node": "^26.6.11",
|
|
142
142
|
"lit": "^3.3.3",
|
|
143
143
|
"typescript": "^6.0.3",
|
|
144
144
|
"vite": "npm:@voidzero-dev/vite-plus-core@8.3.8001",
|
package/docs/errors/SW11002.md
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "SW11002: CSS module ordering cycle"
|
|
3
|
-
description: "Two modules each build styles on a base from the other module."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# SW11002: CSS module ordering cycle
|
|
7
|
-
|
|
8
|
-
This error occurs when two modules each build a style on a base from the other
|
|
9
|
-
module. The CSS of each module must come after the CSS of the modules that it
|
|
10
|
-
builds on, so the two modules have no valid order, even when the individual
|
|
11
|
-
styles do not form a cycle.
|
|
12
|
-
|
|
13
|
-
## Reported
|
|
14
|
-
|
|
15
|
-
**entry.ts**
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
import { style } from "stillwind/react";
|
|
19
|
-
import { middle } from "./middle";
|
|
20
|
-
|
|
21
|
-
export const base = style("p-4");
|
|
22
|
-
export const derived = style(middle, "rounded-md");
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
**middle.ts**
|
|
26
|
-
|
|
27
|
-
```ts
|
|
28
|
-
import { style } from "stillwind/react";
|
|
29
|
-
import { base } from "./entry";
|
|
30
|
-
|
|
31
|
-
export const middle = style(base, "text-blue-600");
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
> SW11002: style composition requires cyclic CSS module ordering
|
|
35
|
-
|
|
36
|
-
## Fixed
|
|
37
|
-
|
|
38
|
-
```ts title="base.ts"
|
|
39
|
-
import { style } from "stillwind/react";
|
|
40
|
-
|
|
41
|
-
export const base = style("p-4");
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
```ts title="entry.ts"
|
|
45
|
-
import { style } from "stillwind/react";
|
|
46
|
-
import { middle } from "./middle";
|
|
47
|
-
|
|
48
|
-
export { base } from "./base";
|
|
49
|
-
export const derived = style(middle, "rounded-md");
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
```ts title="middle.ts"
|
|
53
|
-
import { style } from "stillwind/react";
|
|
54
|
-
import { base } from "./base";
|
|
55
|
-
|
|
56
|
-
export const middle = style(base, "text-blue-600");
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## How to fix
|
|
60
|
-
|
|
61
|
-
- Move the shared bases into a module that both modules import, as in the
|
|
62
|
-
example.
|
|
63
|
-
- Or put the styles that depend on each other in the same module.
|
|
64
|
-
|
|
65
|
-
Changing the order of the imports does not fix it.
|