stillwind 0.8.0 → 0.9.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 +193 -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 +7 -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 +19 -19
- 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 +16 -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 +21 -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 +2 -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 +3 -3
- 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
|
@@ -34,7 +34,7 @@ style(fade("duration-300"));
|
|
|
34
34
|
condition, add a whole definition under a variant key.
|
|
35
35
|
- Write the definition as an object literal, as the initial value of a variable.
|
|
36
36
|
|
|
37
|
-
See [`style.keyframes()`](
|
|
37
|
+
See [`style.keyframes()`](https://stillwind.dev/docs/macros/keyframes#define-the-frames).
|
|
38
38
|
|
|
39
39
|
## Rule settings
|
|
40
40
|
|
|
@@ -44,4 +44,4 @@ See [`style.keyframes()`](../macros/keyframes.md#define-the-frames).
|
|
|
44
44
|
| `strict` | deny |
|
|
45
45
|
| `stylistic` | off |
|
|
46
46
|
|
|
47
|
-
[Configure lint](
|
|
47
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -34,7 +34,7 @@ If the number is a duration in milliseconds, write `duration-[42ms]`, as in the
|
|
|
34
34
|
example. Use the unit that matches the intended duration.
|
|
35
35
|
|
|
36
36
|
A string that contains a utility that is not an animation option is reported by
|
|
37
|
-
[invalid-animation-option](invalid-animation-option
|
|
37
|
+
[invalid-animation-option](https://stillwind.dev/docs/lints/invalid-animation-option) instead.
|
|
38
38
|
|
|
39
39
|
## Rule settings
|
|
40
40
|
|
|
@@ -44,4 +44,4 @@ A string that contains a utility that is not an animation option is reported by
|
|
|
44
44
|
| `strict` | deny |
|
|
45
45
|
| `stylistic` | off |
|
|
46
46
|
|
|
47
|
-
[Configure lint](
|
|
47
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -6,7 +6,7 @@ description: "Reports a state or container variant around a style.keyframes() de
|
|
|
6
6
|
# invalid-keyframes-variant
|
|
7
7
|
|
|
8
8
|
This rule reports a state or container variant, such as `hover:`, around a
|
|
9
|
-
definition inside [`style.keyframes()`](
|
|
9
|
+
definition inside [`style.keyframes()`](https://stillwind.dev/docs/macros/keyframes). A keyframes
|
|
10
10
|
definition belongs to no element, so it cannot be hovered. Only media and
|
|
11
11
|
`supports-*` variants can choose a definition.
|
|
12
12
|
|
|
@@ -39,11 +39,11 @@ style({
|
|
|
39
39
|
## How to fix
|
|
40
40
|
|
|
41
41
|
- To animate an element while it is in a state, put the variant around the
|
|
42
|
-
animation in [`style()`](
|
|
42
|
+
animation in [`style()`](https://stillwind.dev/docs/macros/style), as in the example.
|
|
43
43
|
- To use a different animation for a media condition, such as reduced motion,
|
|
44
44
|
keep the variant in the definition: `"motion-reduce:": { ... }`.
|
|
45
45
|
|
|
46
|
-
See [`style.keyframes()`](
|
|
46
|
+
See [`style.keyframes()`](https://stillwind.dev/docs/macros/keyframes#define-the-frames).
|
|
47
47
|
|
|
48
48
|
## Rule settings
|
|
49
49
|
|
|
@@ -53,4 +53,4 @@ See [`style.keyframes()`](../macros/keyframes.md#define-the-frames).
|
|
|
53
53
|
| `strict` | deny |
|
|
54
54
|
| `stylistic` | off |
|
|
55
55
|
|
|
56
|
-
[Configure lint](
|
|
56
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -29,12 +29,12 @@ style("bg-[#123456]");
|
|
|
29
29
|
|
|
30
30
|
## How to fix
|
|
31
31
|
|
|
32
|
-
- Correct the rule name. The [lint rule reference](
|
|
32
|
+
- Correct the rule name. The [lint rule reference](https://stillwind.dev/docs/lints) lists every
|
|
33
33
|
name.
|
|
34
34
|
- Check the form of the comment: `swlint-disable-next-line`, `swlint-disable-line`,
|
|
35
35
|
or a `swlint-disable` and `swlint-enable` pair, followed by rule names.
|
|
36
36
|
|
|
37
|
-
See [Suppression comments](
|
|
37
|
+
See [Suppression comments](https://stillwind.dev/docs/configuration#suppression-comments).
|
|
38
38
|
|
|
39
39
|
## Rule settings
|
|
40
40
|
|
|
@@ -44,4 +44,4 @@ See [Suppression comments](../configuration.md#suppression-comments).
|
|
|
44
44
|
| `strict` | deny |
|
|
45
45
|
| `stylistic` | off |
|
|
46
46
|
|
|
47
|
-
[Configure lint](
|
|
47
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -31,7 +31,7 @@ const child = style("group-hover:underline");
|
|
|
31
31
|
- Add the marker without a variant, and put the condition on the utilities of the
|
|
32
32
|
element that reacts, such as `group-hover:underline`.
|
|
33
33
|
- To connect elements with names that TypeScript checks, use
|
|
34
|
-
[`style.ref()`](
|
|
34
|
+
[`style.ref()`](https://stillwind.dev/docs/macros/ref) instead of `group` and `peer`.
|
|
35
35
|
|
|
36
36
|
## Options
|
|
37
37
|
|
|
@@ -50,4 +50,4 @@ must match exactly.
|
|
|
50
50
|
| --- | --- |
|
|
51
51
|
| `ignoredClasses` | `[]` |
|
|
52
52
|
|
|
53
|
-
[Configure lint](
|
|
53
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -5,7 +5,7 @@ description: "Reports a condition in style.media() that is not a media query, su
|
|
|
5
5
|
|
|
6
6
|
# invalid-media-query
|
|
7
7
|
|
|
8
|
-
This rule reports an argument of [`style.media()`](
|
|
8
|
+
This rule reports an argument of [`style.media()`](https://stillwind.dev/docs/macros/media) that is not a
|
|
9
9
|
media condition. `hover:` matches a hovered element, not a property of the device, so
|
|
10
10
|
it cannot become a query for
|
|
11
11
|
[`matchMedia()`](https://developer.mozilla.org/docs/Web/API/Window/matchMedia).
|
|
@@ -36,12 +36,12 @@ style.media("can-hover");
|
|
|
36
36
|
- To check whether an input device can hover, define a media variant for that
|
|
37
37
|
capability, as in the example.
|
|
38
38
|
- To style an element while it is hovered, use `hover:` inside
|
|
39
|
-
[`style()`](
|
|
39
|
+
[`style()`](https://stillwind.dev/docs/macros/style).
|
|
40
40
|
- To check the viewport or user preferences, use media variants such as `md` or
|
|
41
41
|
`motion-safe`.
|
|
42
42
|
- `supports-*` and container queries are not media conditions either.
|
|
43
43
|
|
|
44
|
-
See [`style.media()`](
|
|
44
|
+
See [`style.media()`](https://stillwind.dev/docs/macros/media#inputs).
|
|
45
45
|
|
|
46
46
|
## Rule settings
|
|
47
47
|
|
|
@@ -51,4 +51,4 @@ See [`style.media()`](../macros/media.md#inputs).
|
|
|
51
51
|
| `strict` | deny |
|
|
52
52
|
| `stylistic` | off |
|
|
53
53
|
|
|
54
|
-
[Configure lint](
|
|
54
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -5,7 +5,7 @@ description: "Reports a style.ref() label or ref method argument that is not a l
|
|
|
5
5
|
|
|
6
6
|
# invalid-ref-input
|
|
7
7
|
|
|
8
|
-
This rule reports a [`style.ref()`](
|
|
8
|
+
This rule reports a [`style.ref()`](https://stillwind.dev/docs/macros/ref) label or a ref method
|
|
9
9
|
argument that is not a literal. The compiler reads these values at build time,
|
|
10
10
|
so a value from a variable cannot name a ref or configure a method.
|
|
11
11
|
|
|
@@ -35,9 +35,9 @@ style(card);
|
|
|
35
35
|
choose between the refs at runtime. Each `style.ref()` call already creates a
|
|
36
36
|
separate name, so the label does not need to differ.
|
|
37
37
|
- Write method arguments, such as the type of
|
|
38
|
-
[`asContainer()`](
|
|
38
|
+
[`asContainer()`](https://stillwind.dev/docs/macros/ref/as-container), as literals.
|
|
39
39
|
|
|
40
|
-
See [`style.ref()`](
|
|
40
|
+
See [`style.ref()`](https://stillwind.dev/docs/macros/ref).
|
|
41
41
|
|
|
42
42
|
## Rule settings
|
|
43
43
|
|
|
@@ -47,4 +47,4 @@ See [`style.ref()`](../macros/ref/index.md).
|
|
|
47
47
|
| `strict` | deny |
|
|
48
48
|
| `stylistic` | off |
|
|
49
49
|
|
|
50
|
-
[Configure lint](
|
|
50
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -6,7 +6,7 @@ description: "Reports a class field, custom property, or ref inside an object wi
|
|
|
6
6
|
# invalid-rule-group-input
|
|
7
7
|
|
|
8
8
|
This rule reports a `class` field, a custom property, a ref, or a stored
|
|
9
|
-
[`style()`](
|
|
9
|
+
[`style()`](https://stillwind.dev/docs/macros/style) result inside an object with variant keys,
|
|
10
10
|
such as `{ "hover:": ... }`. A variant can only condition utilities, so the
|
|
11
11
|
input is left out.
|
|
12
12
|
|
|
@@ -62,4 +62,4 @@ style({
|
|
|
62
62
|
| `strict` | deny |
|
|
63
63
|
| `stylistic` | off |
|
|
64
64
|
|
|
65
|
-
[Configure lint](
|
|
65
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -53,8 +53,8 @@ export default defineConfig({
|
|
|
53
53
|
set the resulting custom property in JavaScript.
|
|
54
54
|
|
|
55
55
|
A condition that only needs `useCssIf` is reported by
|
|
56
|
-
[runtime-condition-requires-css-if](runtime-condition-requires-css-if
|
|
57
|
-
instead. See [Runtime conditions](
|
|
56
|
+
[runtime-condition-requires-css-if](https://stillwind.dev/docs/lints/runtime-condition-requires-css-if)
|
|
57
|
+
instead. See [Runtime conditions](https://stillwind.dev/docs/guides/runtime-conditions) for the supported
|
|
58
58
|
forms.
|
|
59
59
|
|
|
60
60
|
## Rule settings
|
|
@@ -65,4 +65,4 @@ forms.
|
|
|
65
65
|
| `strict` | deny |
|
|
66
66
|
| `stylistic` | off |
|
|
67
67
|
|
|
68
|
-
[Configure lint](
|
|
68
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -5,7 +5,7 @@ description: "Reports a style.when() argument that is not a sequence of variants
|
|
|
5
5
|
|
|
6
6
|
# invalid-stored-variant
|
|
7
7
|
|
|
8
|
-
This rule reports a [`style.when()`](
|
|
8
|
+
This rule reports a [`style.when()`](https://stillwind.dev/docs/macros/when) call whose argument is
|
|
9
9
|
not one sequence of variants. It also reports a use of a stored variant that
|
|
10
10
|
can refer to more than one `style.when()` call. The compiler expands stored
|
|
11
11
|
variants at build time, so it must know the variants exactly.
|
|
@@ -39,7 +39,7 @@ style({ [selected]: "font-bold" });
|
|
|
39
39
|
- To choose between stored variants at runtime, write a key for each one and
|
|
40
40
|
guard the values, such as `{ [a]: active && "p-4", [b]: !active && "p-4" }`.
|
|
41
41
|
|
|
42
|
-
See [`style.when()`](
|
|
42
|
+
See [`style.when()`](https://stillwind.dev/docs/macros/when#inputs).
|
|
43
43
|
|
|
44
44
|
## Rule settings
|
|
45
45
|
|
|
@@ -49,4 +49,4 @@ See [`style.when()`](../macros/when.md#inputs).
|
|
|
49
49
|
| `strict` | deny |
|
|
50
50
|
| `stylistic` | off |
|
|
51
51
|
|
|
52
|
-
[Configure lint](
|
|
52
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -39,7 +39,7 @@ style(base, "p-4", { "--x": value });
|
|
|
39
39
|
- If several elements need the same value, set the custom property on a common
|
|
40
40
|
ancestor. Custom properties are inherited.
|
|
41
41
|
|
|
42
|
-
See [Base styles](
|
|
42
|
+
See [Base styles](https://stillwind.dev/docs/macros/style#base-styles).
|
|
43
43
|
|
|
44
44
|
## Rule settings
|
|
45
45
|
|
|
@@ -49,4 +49,4 @@ See [Base styles](../macros/style.md#base-styles).
|
|
|
49
49
|
| `strict` | deny |
|
|
50
50
|
| `stylistic` | off |
|
|
51
51
|
|
|
52
|
-
[Configure lint](
|
|
52
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -34,7 +34,7 @@ style("w-[42px]");
|
|
|
34
34
|
utility, such as `w-(--width)`.
|
|
35
35
|
- Store a `style()` result in a variable before you pass it to another call.
|
|
36
36
|
|
|
37
|
-
[`style()`](
|
|
37
|
+
[`style()`](https://stillwind.dev/docs/macros/style#inputs) lists the accepted inputs.
|
|
38
38
|
|
|
39
39
|
## Rule settings
|
|
40
40
|
|
|
@@ -44,4 +44,4 @@ style("w-[42px]");
|
|
|
44
44
|
| `strict` | deny |
|
|
45
45
|
| `stylistic` | off |
|
|
46
46
|
|
|
47
|
-
[Configure lint](
|
|
47
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -35,11 +35,11 @@ contains it produces no CSS.
|
|
|
35
35
|
|
|
36
36
|
## How to fix
|
|
37
37
|
|
|
38
|
-
- Define the token in [`@theme`](
|
|
38
|
+
- Define the token in [`@theme`](https://stillwind.dev/docs/at-rules/theme), as in the example, or
|
|
39
39
|
correct the spelling of its name.
|
|
40
40
|
- If the token is optional, add a fallback: `--theme(--color-brand, blue)`.
|
|
41
41
|
|
|
42
|
-
Malformed `--theme()` syntax causes [SW14007](
|
|
42
|
+
Malformed `--theme()` syntax causes [SW14007](https://stillwind.dev/docs/errors/SW14007) instead.
|
|
43
43
|
|
|
44
44
|
## Rule settings
|
|
45
45
|
|
|
@@ -49,4 +49,4 @@ Malformed `--theme()` syntax causes [SW14007](../errors/SW14007.md) instead.
|
|
|
49
49
|
| `strict` | deny |
|
|
50
50
|
| `stylistic` | off |
|
|
51
51
|
|
|
52
|
-
[Configure lint](
|
|
52
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -28,10 +28,10 @@ style("flex");
|
|
|
28
28
|
## How to fix
|
|
29
29
|
|
|
30
30
|
- Remove the modifier or value that the utility does not accept.
|
|
31
|
-
- Check the accepted forms in [Built-in utilities and variants](
|
|
31
|
+
- Check the accepted forms in [Built-in utilities and variants](https://stillwind.dev/docs/utilities-and-variants).
|
|
32
32
|
|
|
33
33
|
A utility name or theme value that does not exist is reported by
|
|
34
|
-
[unknown-utility](unknown-utility
|
|
34
|
+
[unknown-utility](https://stillwind.dev/docs/lints/unknown-utility) instead.
|
|
35
35
|
|
|
36
36
|
## Rule settings
|
|
37
37
|
|
|
@@ -41,4 +41,4 @@ A utility name or theme value that does not exist is reported by
|
|
|
41
41
|
| `strict` | deny |
|
|
42
42
|
| `stylistic` | off |
|
|
43
43
|
|
|
44
|
-
[Configure lint](
|
|
44
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -32,7 +32,7 @@ style("min-[40rem]:p-4");
|
|
|
32
32
|
- Prefer a named breakpoint, such as `md:`, when one matches the width.
|
|
33
33
|
|
|
34
34
|
A variant name that does not exist is reported by
|
|
35
|
-
[unknown-variant](unknown-variant
|
|
35
|
+
[unknown-variant](https://stillwind.dev/docs/lints/unknown-variant) instead.
|
|
36
36
|
|
|
37
37
|
## Rule settings
|
|
38
38
|
|
|
@@ -42,4 +42,4 @@ A variant name that does not exist is reported by
|
|
|
42
42
|
| `strict` | deny |
|
|
43
43
|
| `stylistic` | off |
|
|
44
44
|
|
|
45
|
-
[Configure lint](
|
|
45
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -33,7 +33,7 @@ style(transition.for("card"));
|
|
|
33
33
|
before the update, and `new` styles the snapshot after it.
|
|
34
34
|
- Write each field as a utility string literal.
|
|
35
35
|
|
|
36
|
-
See [`style.viewTransition()`](
|
|
36
|
+
See [`style.viewTransition()`](https://stillwind.dev/docs/macros/view-transition#define-the-snapshot-styles).
|
|
37
37
|
|
|
38
38
|
## Rule settings
|
|
39
39
|
|
|
@@ -43,4 +43,4 @@ See [`style.viewTransition()`](../macros/view-transition.md#define-the-snapshot-
|
|
|
43
43
|
| `strict` | deny |
|
|
44
44
|
| `stylistic` | off |
|
|
45
45
|
|
|
46
|
-
[Configure lint](
|
|
46
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -33,7 +33,7 @@ const second = style(transition.for("b"));
|
|
|
33
33
|
- Give each element its own `.for()` call with its own key, as in the example.
|
|
34
34
|
- Use a string or a number as the key, such as the ID of the item.
|
|
35
35
|
|
|
36
|
-
See [`style.viewTransition()`](
|
|
36
|
+
See [`style.viewTransition()`](https://stillwind.dev/docs/macros/view-transition#name-the-element).
|
|
37
37
|
|
|
38
38
|
## Rule settings
|
|
39
39
|
|
|
@@ -43,4 +43,4 @@ See [`style.viewTransition()`](../macros/view-transition.md#name-the-element).
|
|
|
43
43
|
| `strict` | deny |
|
|
44
44
|
| `stylistic` | off |
|
|
45
45
|
|
|
46
|
-
[Configure lint](
|
|
46
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -6,7 +6,7 @@ description: "Reports a state or container variant in a style.viewTransition() d
|
|
|
6
6
|
# invalid-view-transition-variant
|
|
7
7
|
|
|
8
8
|
This rule reports a state or container variant, such as `hover:`, in a
|
|
9
|
-
[`style.viewTransition()`](
|
|
9
|
+
[`style.viewTransition()`](https://stillwind.dev/docs/macros/view-transition) definition. The
|
|
10
10
|
snapshots are images of the page, not the element itself, so they cannot be
|
|
11
11
|
hovered. Only media and `supports-*` variants can condition a snapshot style.
|
|
12
12
|
|
|
@@ -38,7 +38,7 @@ style((hovered ? fade : keep).for("card"));
|
|
|
38
38
|
- To use a different transition for a media condition, such as reduced motion,
|
|
39
39
|
keep the variant: `old: "motion-reduce:duration-0"`.
|
|
40
40
|
|
|
41
|
-
See [View transitions](
|
|
41
|
+
See [View transitions](https://stillwind.dev/docs/guides/view-transitions).
|
|
42
42
|
|
|
43
43
|
## Rule settings
|
|
44
44
|
|
|
@@ -48,4 +48,4 @@ See [View transitions](../guides/view-transitions.md).
|
|
|
48
48
|
| `strict` | deny |
|
|
49
49
|
| `stylistic` | off |
|
|
50
50
|
|
|
51
|
-
[Configure lint](
|
|
51
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -5,7 +5,7 @@ description: "Reports an import of style() from the entrypoint of another framew
|
|
|
5
5
|
|
|
6
6
|
# mismatched-framework-import
|
|
7
7
|
|
|
8
|
-
This rule reports a file that imports [`style()`](
|
|
8
|
+
This rule reports a file that imports [`style()`](https://stillwind.dev/docs/macros/style) from the
|
|
9
9
|
entrypoint of another framework, such as `stillwind/astro` in a React component.
|
|
10
10
|
Each entrypoint selects a class key and style representation. Entrypoints with
|
|
11
11
|
the same output format are compatible.
|
|
@@ -34,7 +34,7 @@ export const props = style("p-4");
|
|
|
34
34
|
|
|
35
35
|
Import from the entrypoint of the framework that renders the element. A React
|
|
36
36
|
island inside an Astro page imports `stillwind/react`. See
|
|
37
|
-
[Framework integrations](
|
|
37
|
+
[Framework integrations](https://stillwind.dev/docs/integrations#import-style-for-your-framework).
|
|
38
38
|
|
|
39
39
|
## Rule settings
|
|
40
40
|
|
|
@@ -44,4 +44,4 @@ island inside an Astro page imports `stillwind/react`. See
|
|
|
44
44
|
| `strict` | deny |
|
|
45
45
|
| `stylistic` | off |
|
|
46
46
|
|
|
47
|
-
[Configure lint](
|
|
47
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -31,7 +31,7 @@ style.css("p-4", { selector: ":host" });
|
|
|
31
31
|
- Add a `selector` option, such as `:host` for the shadow host.
|
|
32
32
|
- Or use a variant that sets its own selector, such as `host:p-4`.
|
|
33
33
|
|
|
34
|
-
See [`style.css()`](
|
|
34
|
+
See [`style.css()`](https://stillwind.dev/docs/macros/css#inputs).
|
|
35
35
|
|
|
36
36
|
## Rule settings
|
|
37
37
|
|
|
@@ -41,4 +41,4 @@ See [`style.css()`](../macros/css.md#inputs).
|
|
|
41
41
|
| `strict` | deny |
|
|
42
42
|
| `stylistic` | off |
|
|
43
43
|
|
|
44
|
-
[Configure lint](
|
|
44
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -5,8 +5,8 @@ description: "Reports asContainer() or asAnchor() in a call that does not attach
|
|
|
5
5
|
|
|
6
6
|
# missing-ref-attachment
|
|
7
7
|
|
|
8
|
-
This rule reports [`asContainer()`](
|
|
9
|
-
[`asAnchor()`](
|
|
8
|
+
This rule reports [`asContainer()`](https://stillwind.dev/docs/macros/ref/as-container) or
|
|
9
|
+
[`asAnchor()`](https://stillwind.dev/docs/macros/ref/as-anchor) in a [`style()`](https://stillwind.dev/docs/macros/style)
|
|
10
10
|
call that does not also attach the ref. The container or anchor applies only to
|
|
11
11
|
an element that has the ref, so without it, nothing happens.
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ style(card, card.asContainer("inline-size"));
|
|
|
32
32
|
|
|
33
33
|
Pass the ref and the method in the same `style()` call, as in the example.
|
|
34
34
|
|
|
35
|
-
[`positionAnchor()`](
|
|
35
|
+
[`positionAnchor()`](https://stillwind.dev/docs/macros/ref/position-anchor) is not reported. The
|
|
36
36
|
positioned element does not need the ref.
|
|
37
37
|
|
|
38
38
|
## Rule settings
|
|
@@ -43,4 +43,4 @@ positioned element does not need the ref.
|
|
|
43
43
|
| `strict` | deny |
|
|
44
44
|
| `stylistic` | off |
|
|
45
45
|
|
|
46
|
-
[Configure lint](
|
|
46
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -5,8 +5,8 @@ description: "Reports a view transition applied without .for()."
|
|
|
5
5
|
|
|
6
6
|
# missing-view-transition-name
|
|
7
7
|
|
|
8
|
-
This rule reports a [`style()`](
|
|
9
|
-
transition without [`.for()`](
|
|
8
|
+
This rule reports a [`style()`](https://stillwind.dev/docs/macros/style) call that applies a view
|
|
9
|
+
transition without [`.for()`](https://stillwind.dev/docs/macros/view-transition). The transition
|
|
10
10
|
adds its class, but the element has no
|
|
11
11
|
[`view-transition-name`](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/view-transition-name),
|
|
12
12
|
so the browser does not capture it.
|
|
@@ -45,4 +45,4 @@ The rule does not check that keys are unique across the page.
|
|
|
45
45
|
| `strict` | deny |
|
|
46
46
|
| `stylistic` | off |
|
|
47
47
|
|
|
48
|
-
[Configure lint](
|
|
48
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -35,7 +35,7 @@ style({ "--count": previous });
|
|
|
35
35
|
- The rule detects updates that it can see in the source. A function that changes
|
|
36
36
|
state internally is not reported, so keep such calls out of the arguments too.
|
|
37
37
|
|
|
38
|
-
See [Side effects in arguments](
|
|
38
|
+
See [Side effects in arguments](https://stillwind.dev/docs/macros/style#side-effects-in-arguments).
|
|
39
39
|
|
|
40
40
|
## Rule settings
|
|
41
41
|
|
|
@@ -45,4 +45,4 @@ See [Side effects in arguments](../macros/style.md#side-effects-in-arguments).
|
|
|
45
45
|
| `strict` | deny |
|
|
46
46
|
| `stylistic` | off |
|
|
47
47
|
|
|
48
|
-
[Configure lint](
|
|
48
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -37,7 +37,7 @@ name as a variant, as in the example:
|
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
If a default breakpoint such as `md:` fits the design, use it instead. To use the
|
|
40
|
-
same width in JavaScript, pass the name to [`style.media()`](
|
|
40
|
+
same width in JavaScript, pass the name to [`style.media()`](https://stillwind.dev/docs/macros/media).
|
|
41
41
|
|
|
42
42
|
## Rule settings
|
|
43
43
|
|
|
@@ -47,4 +47,4 @@ same width in JavaScript, pass the name to [`style.media()`](../macros/media.md)
|
|
|
47
47
|
| `strict` | off |
|
|
48
48
|
| `stylistic` | off |
|
|
49
49
|
|
|
50
|
-
[Configure lint](
|
|
50
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -38,7 +38,7 @@ the example:
|
|
|
38
38
|
|
|
39
39
|
If the color already exists in the theme, use its name instead. To stop
|
|
40
40
|
components from using the default palette directly, also enable
|
|
41
|
-
[no-restricted-theme-tokens](no-restricted-theme-tokens
|
|
41
|
+
[no-restricted-theme-tokens](https://stillwind.dev/docs/lints/no-restricted-theme-tokens).
|
|
42
42
|
|
|
43
43
|
## Rule settings
|
|
44
44
|
|
|
@@ -48,4 +48,4 @@ components from using the default palette directly, also enable
|
|
|
48
48
|
| `strict` | off |
|
|
49
49
|
| `stylistic` | off |
|
|
50
50
|
|
|
51
|
-
[Configure lint](
|
|
51
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -5,7 +5,7 @@ description: "Reports the class field, which adds classes without generated CSS.
|
|
|
5
5
|
|
|
6
6
|
# no-class-property
|
|
7
7
|
|
|
8
|
-
This rule reports a `class` field in [`style()`](
|
|
8
|
+
This rule reports a `class` field in [`style()`](https://stillwind.dev/docs/macros/style). A `class`
|
|
9
9
|
field adds classes that another stylesheet defines, so Stillwind does not check
|
|
10
10
|
them. Enable this rule when every style in the project must come from utilities.
|
|
11
11
|
No preset enables it.
|
|
@@ -45,7 +45,7 @@ style("card");
|
|
|
45
45
|
- Move the class's declarations into a utility, as in the example. Keep the same
|
|
46
46
|
declarations so the component's appearance does not change.
|
|
47
47
|
- If a third-party library needs its own class, keep the `class` field and add a
|
|
48
|
-
[suppression comment](
|
|
48
|
+
[suppression comment](https://stillwind.dev/docs/configuration#suppression-comments) with the
|
|
49
49
|
reason.
|
|
50
50
|
|
|
51
51
|
## Rule settings
|
|
@@ -56,4 +56,4 @@ style("card");
|
|
|
56
56
|
| `strict` | off |
|
|
57
57
|
| `stylistic` | off |
|
|
58
58
|
|
|
59
|
-
[Configure lint](
|
|
59
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -33,7 +33,7 @@ style(base, "p-4");
|
|
|
33
33
|
- To override a shared style, pass it as a base. The later utilities win without
|
|
34
34
|
`!`, as in the example.
|
|
35
35
|
- To win over a stylesheet that you do not control, use the `important` field of
|
|
36
|
-
the project instead. See [Configuration](
|
|
36
|
+
the project instead. See [Configuration](https://stillwind.dev/docs/configuration#generated-css).
|
|
37
37
|
|
|
38
38
|
## Rule settings
|
|
39
39
|
|
|
@@ -47,4 +47,4 @@ style(base, "p-4");
|
|
|
47
47
|
| --- | --- |
|
|
48
48
|
| `checkImplementation` | `true` |
|
|
49
49
|
|
|
50
|
-
[Configure lint](
|
|
50
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -73,4 +73,4 @@ accept `*` and `?` and ignore case. Every matching entry applies.
|
|
|
73
73
|
| `checkImplementation` | `true` |
|
|
74
74
|
| `rules` | `[]` |
|
|
75
75
|
|
|
76
|
-
[Configure lint](
|
|
76
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -70,4 +70,4 @@ specific entry can make an exception.
|
|
|
70
70
|
| `checkImplementation` | `false` |
|
|
71
71
|
| `rules` | `[]` |
|
|
72
72
|
|
|
73
|
-
[Configure lint](
|
|
73
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -70,4 +70,4 @@ list must not be empty when the rule is on.
|
|
|
70
70
|
| `checkImplementation` | `true` |
|
|
71
71
|
| `tokens` | `[]` |
|
|
72
72
|
|
|
73
|
-
[Configure lint](
|
|
73
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -56,7 +56,7 @@ Follow the message of the matching entry. In the example, the project prefers
|
|
|
56
56
|
Patterns accept `*` and `?`, and they are case-sensitive.
|
|
57
57
|
|
|
58
58
|
To also catch other utilities that produce the same CSS, use
|
|
59
|
-
[no-restricted-declarations](no-restricted-declarations
|
|
59
|
+
[no-restricted-declarations](https://stillwind.dev/docs/lints/no-restricted-declarations).
|
|
60
60
|
|
|
61
61
|
## Rule settings
|
|
62
62
|
|
|
@@ -70,4 +70,4 @@ To also catch other utilities that produce the same CSS, use
|
|
|
70
70
|
| --- | --- |
|
|
71
71
|
| `utilities` | `[]` |
|
|
72
72
|
|
|
73
|
-
[Configure lint](
|
|
73
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -13,7 +13,7 @@ active theme and custom definitions.
|
|
|
13
13
|
The rule also finds the utility for CSS that you know. Write the declaration as an
|
|
14
14
|
arbitrary property, and let `stillwind lint --fix` replace it.
|
|
15
15
|
|
|
16
|
-
Within one string or one CSS [`@apply`](
|
|
16
|
+
Within one string or one CSS [`@apply`](https://stillwind.dev/docs/at-rules/apply) statement, it can
|
|
17
17
|
combine utilities such as `w-4 h-4` into `size-4`. Utilities must have the same
|
|
18
18
|
variants and importance.
|
|
19
19
|
|
|
@@ -84,4 +84,4 @@ reduces specificity.
|
|
|
84
84
|
| `logicalToPhysical` | `false` |
|
|
85
85
|
| `preserveSpecificity` | `true` |
|
|
86
86
|
|
|
87
|
-
[Configure lint](
|
|
87
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -30,10 +30,10 @@ const button = style("p-4");
|
|
|
30
30
|
## How to fix
|
|
31
31
|
|
|
32
32
|
- Give the styles to the element itself with its own
|
|
33
|
-
[`style()`](
|
|
33
|
+
[`style()`](https://stillwind.dev/docs/macros/style) call, as in the example.
|
|
34
34
|
- If the element comes from markup that you cannot change, such as rendered
|
|
35
35
|
Markdown, keep the selector and add a
|
|
36
|
-
[suppression comment](
|
|
36
|
+
[suppression comment](https://stillwind.dev/docs/configuration#suppression-comments) with the
|
|
37
37
|
reason.
|
|
38
38
|
|
|
39
39
|
## Rule settings
|
|
@@ -44,4 +44,4 @@ const button = style("p-4");
|
|
|
44
44
|
| `strict` | off |
|
|
45
45
|
| `stylistic` | warn |
|
|
46
46
|
|
|
47
|
-
[Configure lint](
|
|
47
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -32,10 +32,10 @@ style("ms-4");
|
|
|
32
32
|
logical form, as in the example.
|
|
33
33
|
- If the side must stay on the left in every language, such as for an icon that
|
|
34
34
|
points left, keep the physical form and add a
|
|
35
|
-
[suppression comment](
|
|
35
|
+
[suppression comment](https://stillwind.dev/docs/configuration#suppression-comments).
|
|
36
36
|
- For `overflow-x-*`, `overflow-y-*`, `overscroll-x-*`, `overscroll-y-*`, and
|
|
37
37
|
`divide-y-*`, import
|
|
38
|
-
the matching [logical stylesheet](
|
|
38
|
+
the matching [logical stylesheet](https://stillwind.dev/docs/concepts/stylesheets#logical-axis-utilities).
|
|
39
39
|
These utilities then keep their names and write logical properties.
|
|
40
40
|
|
|
41
41
|
## Shorthands
|
|
@@ -64,4 +64,4 @@ values differ, so the rule reports the shorthand.
|
|
|
64
64
|
| --- | --- |
|
|
65
65
|
| `checkImplementation` | `false` |
|
|
66
66
|
|
|
67
|
-
[Configure lint](
|
|
67
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|