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
|
@@ -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.
|
|
@@ -29,19 +29,36 @@ style("ms-4");
|
|
|
29
29
|
## How to fix
|
|
30
30
|
|
|
31
31
|
- If the margin separates the element from the content before it, use the
|
|
32
|
-
logical form, as in the example.
|
|
32
|
+
logical form, as in the example. Most physical utilities have a logical
|
|
33
|
+
utility that gives the same result in horizontal left-to-right text:
|
|
34
|
+
|
|
35
|
+
| Physical | Logical |
|
|
36
|
+
| ------------------------------------------------------ | ------------------------------------------------------------ |
|
|
37
|
+
| `w-*`, `h-*` | `inline-*`, `block-*` |
|
|
38
|
+
| `min-w-*`, `max-w-*`, `min-h-*`, `max-h-*` | `min-inline-*`, `max-inline-*`, `min-block-*`, `max-block-*` |
|
|
39
|
+
| `mt-*`, `mr-*`, `mb-*`, `ml-*` | `mbs-*`, `me-*`, `mbe-*`, `ms-*` |
|
|
40
|
+
| `pt-*`, `pr-*`, `pb-*`, `pl-*` | `pbs-*`, `pe-*`, `pbe-*`, `ps-*` |
|
|
41
|
+
| `top-*`, `right-*`, `bottom-*`, `left-*` | `inset-bs-*`, `inset-e-*`, `inset-be-*`, `inset-s-*` |
|
|
42
|
+
| `border-t-*`, `border-r-*`, `border-b-*`, `border-l-*` | `border-bs-*`, `border-e-*`, `border-be-*`, `border-s-*` |
|
|
43
|
+
| `rounded-l-*`, `rounded-tl-*` | `rounded-s-*`, `rounded-ss-*` |
|
|
44
|
+
| `text-left`, `float-left`, `clear-left` | `text-start`, `float-start`, `clear-start` |
|
|
45
|
+
|
|
33
46
|
- If the side must stay on the left in every language, such as for an icon that
|
|
34
47
|
points left, keep the physical form and add a
|
|
35
|
-
[suppression comment](
|
|
48
|
+
[suppression comment](https://stillwind.dev/docs/configuration#suppression-comments).
|
|
36
49
|
- For `overflow-x-*`, `overflow-y-*`, `overscroll-x-*`, `overscroll-y-*`, and
|
|
37
50
|
`divide-y-*`, import
|
|
38
|
-
the matching [logical stylesheet](
|
|
51
|
+
the matching [logical stylesheet](https://stillwind.dev/docs/concepts/stylesheets#logical-axis-utilities).
|
|
39
52
|
These utilities then keep their names and write logical properties.
|
|
40
53
|
|
|
41
54
|
## Shorthands
|
|
42
55
|
|
|
43
56
|
A shorthand that gives every side the same value does not depend on the writing
|
|
44
|
-
direction, so this rule does not report `p-4` or `overflow-hidden`.
|
|
57
|
+
direction, so this rule does not report `p-4` or `overflow-hidden`. The same
|
|
58
|
+
applies when one rule sets every physical property of a group to one value, so
|
|
59
|
+
the rule does not report `size-6`, which sets `width` and `height` to the same
|
|
60
|
+
value. A utility that sets `width` and `height` in different rules, such as
|
|
61
|
+
under different media queries, is still reported.
|
|
45
62
|
|
|
46
63
|
The rule reports a shorthand with different values for its sides, such as
|
|
47
64
|
`[padding:1rem_2rem]`. It also reports a shorthand that sets only some sides, such
|
|
@@ -64,4 +81,4 @@ values differ, so the rule reports the shorthand.
|
|
|
64
81
|
| --- | --- |
|
|
65
82
|
| `checkImplementation` | `false` |
|
|
66
83
|
|
|
67
|
-
[Configure lint](
|
|
84
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -31,7 +31,7 @@ Run `stillwind fmt`, or `stillwind lint --fix` with this rule enabled. The edito
|
|
|
31
31
|
also sorts on save with `source.sort.stillwind`.
|
|
32
32
|
|
|
33
33
|
`stillwind fmt` sorts even when this rule is off. To stop all sorting, set
|
|
34
|
-
`sort: false`. See [Sorting](
|
|
34
|
+
`sort: false`. See [Sorting](https://stillwind.dev/docs/configuration#sorting).
|
|
35
35
|
|
|
36
36
|
## Rule settings
|
|
37
37
|
|
|
@@ -41,6 +41,6 @@ also sorts on save with `source.sort.stillwind`.
|
|
|
41
41
|
| `strict` | off |
|
|
42
42
|
| `stylistic` | warn |
|
|
43
43
|
|
|
44
|
-
[Configure lint](
|
|
44
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
45
45
|
|
|
46
46
|
The CLI and the editor report this rule only when they analyze the whole project.
|
|
@@ -33,9 +33,9 @@ const title = style({ [card("hover")]: "text-red-500" });
|
|
|
33
33
|
- Replace `group` with a ref on the parent, and `group-hover:` with a condition on
|
|
34
34
|
that ref, as in the example.
|
|
35
35
|
- Replace `peer` with a ref on the sibling, and use
|
|
36
|
-
[`.in()`](
|
|
36
|
+
[`.in()`](https://stillwind.dev/docs/macros/ref/in) with a ref on a shared ancestor.
|
|
37
37
|
|
|
38
|
-
See [Element relationships](
|
|
38
|
+
See [Element relationships](https://stillwind.dev/docs/guides/element-relationships).
|
|
39
39
|
|
|
40
40
|
## Rule settings
|
|
41
41
|
|
|
@@ -45,4 +45,4 @@ See [Element relationships](../guides/element-relationships.md).
|
|
|
45
45
|
| `strict` | off |
|
|
46
46
|
| `stylistic` | warn |
|
|
47
47
|
|
|
48
|
-
[Configure lint](
|
|
48
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -40,4 +40,4 @@ does not check the value that the property receives at runtime.
|
|
|
40
40
|
| `strict` | off |
|
|
41
41
|
| `stylistic` | warn |
|
|
42
42
|
|
|
43
|
-
[Configure lint](
|
|
43
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -5,7 +5,7 @@ description: "Reports a condition in your stylesheet that a named variant can re
|
|
|
5
5
|
|
|
6
6
|
# prefer-variant-directive
|
|
7
7
|
|
|
8
|
-
This rule reports a condition in a rule or a [`@utility`](
|
|
8
|
+
This rule reports a condition in a rule or a [`@utility`](https://stillwind.dev/docs/at-rules/utility)
|
|
9
9
|
body of your stylesheet, such as an `@media` query, that a variant of your theme
|
|
10
10
|
expresses with the same meaning. The named variant keeps the stylesheet in sync
|
|
11
11
|
when the theme changes the breakpoint. The `stylistic` preset enables this rule.
|
|
@@ -36,7 +36,7 @@ when the theme changes the breakpoint. The `stylistic` preset enables this rule.
|
|
|
36
36
|
|
|
37
37
|
## How to fix
|
|
38
38
|
|
|
39
|
-
Replace the condition with [`@variant`](
|
|
39
|
+
Replace the condition with [`@variant`](https://stillwind.dev/docs/at-rules/variant) and the name of
|
|
40
40
|
the variant, as in the example. The automatic fix applies it.
|
|
41
41
|
|
|
42
42
|
## Options
|
|
@@ -56,4 +56,4 @@ With it, `@media (width >= 768px)` also matches `md`.
|
|
|
56
56
|
| --- | --- |
|
|
57
57
|
| `pxToRem` | `false` |
|
|
58
58
|
|
|
59
|
-
[Configure lint](
|
|
59
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -37,7 +37,7 @@ style("md:p-4");
|
|
|
37
37
|
Remove the extra variant, and keep the others. The automatic fix removes it.
|
|
38
38
|
|
|
39
39
|
Variants that can never match together are reported by
|
|
40
|
-
[unsatisfiable-variants](unsatisfiable-variants
|
|
40
|
+
[unsatisfiable-variants](https://stillwind.dev/docs/lints/unsatisfiable-variants) instead.
|
|
41
41
|
|
|
42
42
|
## Rule settings
|
|
43
43
|
|
|
@@ -47,4 +47,4 @@ Variants that can never match together are reported by
|
|
|
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.
|
|
@@ -46,7 +46,7 @@ function Items({ labels }: { labels: string[] }) {
|
|
|
46
46
|
|
|
47
47
|
- To space items in a list, put `gap` on the list, as in the example.
|
|
48
48
|
- To style an element from the state of a sibling, use refs with
|
|
49
|
-
[`.in()`](
|
|
49
|
+
[`.in()`](https://stillwind.dev/docs/macros/ref/in).
|
|
50
50
|
|
|
51
51
|
## Rule settings
|
|
52
52
|
|
|
@@ -56,4 +56,4 @@ function Items({ labels }: { labels: string[] }) {
|
|
|
56
56
|
| `strict` | deny |
|
|
57
57
|
| `stylistic` | off |
|
|
58
58
|
|
|
59
|
-
[Configure lint](
|
|
59
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -46,8 +46,8 @@ style("if(--state:active):block");
|
|
|
46
46
|
- Otherwise, represent the state with an attribute and use an attribute variant.
|
|
47
47
|
That requires changing the code that sets the state as well.
|
|
48
48
|
|
|
49
|
-
See [Runtime conditions](
|
|
50
|
-
[Configuration](
|
|
49
|
+
See [Runtime conditions](https://stillwind.dev/docs/guides/runtime-conditions#enable-native-css-if) and
|
|
50
|
+
[Configuration](https://stillwind.dev/docs/configuration#generated-css).
|
|
51
51
|
|
|
52
52
|
## Rule settings
|
|
53
53
|
|
|
@@ -57,4 +57,4 @@ See [Runtime conditions](../guides/runtime-conditions.md#enable-native-css-if) a
|
|
|
57
57
|
| `strict` | deny |
|
|
58
58
|
| `stylistic` | off |
|
|
59
59
|
|
|
60
|
-
[Configure lint](
|
|
60
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -6,7 +6,7 @@ description: "Reports view transitions split across separate style() calls."
|
|
|
6
6
|
# split-view-transition-class
|
|
7
7
|
|
|
8
8
|
This rule reports view transitions that reach one element through separate
|
|
9
|
-
[`style()`](
|
|
9
|
+
[`style()`](https://stillwind.dev/docs/macros/style) calls, such as a base style and the call that
|
|
10
10
|
receives it. Each call sets the whole `view-transition-class` list, so one list
|
|
11
11
|
replaces the other.
|
|
12
12
|
|
|
@@ -34,7 +34,7 @@ style(first, second.for("card"));
|
|
|
34
34
|
## How to fix
|
|
35
35
|
|
|
36
36
|
Pass every transition of the element to the same `style()` call, with one
|
|
37
|
-
[`.for()`](
|
|
37
|
+
[`.for()`](https://stillwind.dev/docs/macros/view-transition) call, as in the example. You can
|
|
38
38
|
still store and share the transition definitions themselves.
|
|
39
39
|
|
|
40
40
|
## Rule settings
|
|
@@ -45,4 +45,4 @@ still store and share the transition definitions themselves.
|
|
|
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.
|
|
@@ -6,7 +6,7 @@ description: "Reports await, yield, or import() inside an argument of style() or
|
|
|
6
6
|
# suspending-macro-argument
|
|
7
7
|
|
|
8
8
|
This rule reports `await`, `yield`, or a dynamic `import()` inside an argument of
|
|
9
|
-
[`style()`](
|
|
9
|
+
[`style()`](https://stillwind.dev/docs/macros/style) or another macro. The compiler can move or skip
|
|
10
10
|
argument expressions, so the code would not wait or load where you wrote it.
|
|
11
11
|
|
|
12
12
|
## Reported
|
|
@@ -43,4 +43,4 @@ variable, as in the example.
|
|
|
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.
|
|
@@ -30,12 +30,12 @@ style("bg-red-950");
|
|
|
30
30
|
- Check the spelling against the theme. In the example, the last character is
|
|
31
31
|
the letter `O` instead of zero. The intended token is `--color-red-950`.
|
|
32
32
|
- To use a value that the theme does not have, add a token to your stylesheet,
|
|
33
|
-
such as `--color-red-999` in [`@theme`](
|
|
34
|
-
utility with [`@utility`](
|
|
33
|
+
such as `--color-red-999` in [`@theme`](https://stillwind.dev/docs/at-rules/theme), or define the
|
|
34
|
+
utility with [`@utility`](https://stillwind.dev/docs/at-rules/utility).
|
|
35
35
|
- For a class that another stylesheet defines, pass it in a `class` field, such as
|
|
36
36
|
`style({ class: "external-card" })`.
|
|
37
37
|
|
|
38
|
-
[Built-in utilities and variants](
|
|
38
|
+
[Built-in utilities and variants](https://stillwind.dev/docs/utilities-and-variants) looks up the
|
|
39
39
|
utilities of the default theme.
|
|
40
40
|
|
|
41
41
|
## Rule settings
|
|
@@ -46,4 +46,4 @@ utilities of the default theme.
|
|
|
46
46
|
| `strict` | deny |
|
|
47
47
|
| `stylistic` | off |
|
|
48
48
|
|
|
49
|
-
[Configure lint](
|
|
49
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -29,7 +29,7 @@ style("hover:p-4");
|
|
|
29
29
|
|
|
30
30
|
- Correct the spelling of the variant.
|
|
31
31
|
- To use a variant of your own, define it with
|
|
32
|
-
[`@custom-variant`](
|
|
32
|
+
[`@custom-variant`](https://stillwind.dev/docs/at-rules/custom-variant) in your stylesheet.
|
|
33
33
|
|
|
34
34
|
## Rule settings
|
|
35
35
|
|
|
@@ -39,4 +39,4 @@ style("hover:p-4");
|
|
|
39
39
|
| `strict` | deny |
|
|
40
40
|
| `stylistic` | off |
|
|
41
41
|
|
|
42
|
-
[Configure lint](
|
|
42
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -30,7 +30,7 @@ style.css("[:host(.page)]:block");
|
|
|
30
30
|
- Add a class or an attribute to the host, and test it inside `:host()`, as in the
|
|
31
31
|
example.
|
|
32
32
|
- Set a custom property on the outer element, and read it on the host with
|
|
33
|
-
[`--if()`](
|
|
33
|
+
[`--if()`](https://stillwind.dev/docs/guides/runtime-conditions). Custom properties inherit into a
|
|
34
34
|
shadow tree.
|
|
35
35
|
|
|
36
36
|
## Rule settings
|
|
@@ -41,4 +41,4 @@ style.css("[:host(.page)]:block");
|
|
|
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.
|
|
@@ -39,4 +39,4 @@ style("portrait:p-4 landscape:p-4");
|
|
|
39
39
|
| `strict` | deny |
|
|
40
40
|
| `stylistic` | off |
|
|
41
41
|
|
|
42
|
-
[Configure lint](
|
|
42
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -52,6 +52,6 @@ check that the comment is on the right line and names the right rule.
|
|
|
52
52
|
| `strict` | deny |
|
|
53
53
|
| `stylistic` | off |
|
|
54
54
|
|
|
55
|
-
[Configure lint](
|
|
55
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
56
56
|
|
|
57
57
|
The CLI and the editor report this rule only when they analyze the whole project.
|
|
@@ -6,7 +6,7 @@ description: "Reports a base style whose source the CLI cannot find from its typ
|
|
|
6
6
|
# unverified-style-base
|
|
7
7
|
|
|
8
8
|
This rule reports a base style whose type does not show which
|
|
9
|
-
[`style()`](
|
|
9
|
+
[`style()`](https://stillwind.dev/docs/macros/style) call created it, such as a value declared as
|
|
10
10
|
`ReturnType<typeof style>`. The compiler cannot find the CSS of the base, so
|
|
11
11
|
it cannot order the later utilities after it.
|
|
12
12
|
|
|
@@ -60,6 +60,6 @@ export const props = style(base, "p-4");
|
|
|
60
60
|
| `strict` | deny |
|
|
61
61
|
| `stylistic` | off |
|
|
62
62
|
|
|
63
|
-
[Configure lint](
|
|
63
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
64
64
|
|
|
65
65
|
The CLI and the editor report this rule only when they analyze the whole project.
|
|
@@ -28,25 +28,25 @@ export const popover = style("absolute", trigger.positionAnchor(), "top-[anchor(
|
|
|
28
28
|
|
|
29
29
|
```ts
|
|
30
30
|
const trigger = undefined;
|
|
31
|
-
export const provider = {className:"
|
|
32
|
-
export const scope = {className:"
|
|
33
|
-
export const popover = {className:"
|
|
31
|
+
export const provider = {className:"sw_7u6im sw_trigger_xnhw0"};
|
|
32
|
+
export const scope = {className:"sw_at8ic"};
|
|
33
|
+
export const popover = {className:"sw_e3wyz"};
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### Generated CSS
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
```css
|
|
40
|
-
.
|
|
41
|
-
anchor-name: --sw-a-trigger-
|
|
40
|
+
.sw_7u6im:where(.sw_trigger_xnhw0) {
|
|
41
|
+
anchor-name: --sw-a-trigger-xnhw0;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
.
|
|
45
|
-
anchor-scope: --sw-a-trigger-
|
|
44
|
+
.sw_at8ic {
|
|
45
|
+
anchor-scope: --sw-a-trigger-xnhw0;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.
|
|
49
|
-
position-anchor: --sw-a-trigger-
|
|
48
|
+
.sw_e3wyz {
|
|
49
|
+
position-anchor: --sw-a-trigger-xnhw0;
|
|
50
50
|
position: absolute;
|
|
51
51
|
top: anchor(bottom);
|
|
52
52
|
}
|
|
@@ -74,14 +74,14 @@ Write the array or keyword directly in the call. When a variable in the array
|
|
|
74
74
|
can hold one of several refs, the scope includes every ref that it can hold.
|
|
75
75
|
|
|
76
76
|
An empty array sets nothing, and repeated refs add nothing.
|
|
77
|
-
[ineffective-anchor-scope](
|
|
77
|
+
[ineffective-anchor-scope](https://stillwind.dev/docs/lints/ineffective-anchor-scope) reports both.
|
|
78
78
|
|
|
79
79
|
`style.anchorScope()` only sets the CSS property. It does not attach a ref, it
|
|
80
80
|
does not create an anchor name, and it does not affect
|
|
81
|
-
[`.in()`](ref/in
|
|
81
|
+
[`.in()`](https://stillwind.dev/docs/macros/ref/in) conditions.
|
|
82
82
|
|
|
83
83
|
You can also set the scope on the anchor itself with
|
|
84
|
-
`trigger.asAnchor(scope)`. See [`ref.asAnchor()`](ref/as-anchor
|
|
84
|
+
`trigger.asAnchor(scope)`. See [`ref.asAnchor()`](https://stillwind.dev/docs/macros/ref/as-anchor).
|
|
85
85
|
|
|
86
86
|
## Generated code
|
|
87
87
|
|
|
@@ -89,5 +89,5 @@ The compiler turns the scope into generated anchor names or the keyword. When
|
|
|
89
89
|
it knows every ref, no JavaScript reads the refs at runtime. Stillwind does not
|
|
90
90
|
position elements with JavaScript; the browser's CSS anchor positioning does.
|
|
91
91
|
|
|
92
|
-
See [Element relationships](
|
|
92
|
+
See [Element relationships](https://stillwind.dev/docs/guides/element-relationships#position-an-element-at-an-anchor)
|
|
93
93
|
for a complete example.
|
package/docs/macros/css.md
CHANGED
|
@@ -6,7 +6,7 @@ description: "Compile utilities into a CSS string that you place yourself, such
|
|
|
6
6
|
# style.css()
|
|
7
7
|
|
|
8
8
|
`style.css(...rules, options?)` compiles utilities into a CSS string. Unlike
|
|
9
|
-
[`style()`](style
|
|
9
|
+
[`style()`](https://stillwind.dev/docs/macros/style), it adds nothing to the page's stylesheet. You
|
|
10
10
|
decide where the string goes, such as a shadow root.
|
|
11
11
|
|
|
12
12
|
## Example
|
|
@@ -24,7 +24,7 @@ export const css = style.css("p-4 text-blue-600", {
|
|
|
24
24
|
### Compiled code
|
|
25
25
|
|
|
26
26
|
```ts
|
|
27
|
-
export const css = ":where(:root,:host){--color-blue-600:oklch(54.6% .245 262.881);--spacing:.25rem}:host{padding:calc(var(--spacing)
|
|
27
|
+
export const css = ":where(:root,:host){--color-blue-600:oklch(54.6% .245 262.881);--spacing:.25rem}:host{padding:calc(var(--spacing)*4);color:var(--color-blue-600)}";
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
### Generated CSS
|
|
@@ -36,7 +36,7 @@ This macro adds no CSS to the stylesheet.
|
|
|
36
36
|
`rules` accepts utility strings, arrays, objects with variant keys, and `false`,
|
|
37
37
|
`null`, or `undefined`. All of them must be known at build time. Runtime
|
|
38
38
|
conditions, refs, `class` fields, custom properties, and stored `style()`
|
|
39
|
-
results are not accepted, and [invalid-css-input](
|
|
39
|
+
results are not accepted, and [invalid-css-input](https://stillwind.dev/docs/lints/invalid-css-input)
|
|
40
40
|
reports them.
|
|
41
41
|
|
|
42
42
|
The last argument can be an options object literal:
|
|
@@ -44,11 +44,11 @@ The last argument can be an options object literal:
|
|
|
44
44
|
| Option | Value |
|
|
45
45
|
| ---------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
46
46
|
| `selector` | The selector that utilities without their own selector style, such as `:host` |
|
|
47
|
-
| `template` | The name of an [`@stillwind-css-template`](
|
|
47
|
+
| `template` | The name of an [`@stillwind-css-template`](https://stillwind.dev/docs/at-rules/stillwind-css-template) in your stylesheet; defaults to `default` |
|
|
48
48
|
|
|
49
49
|
A variant that sets its own selector, such as `host:` or `[button]:`, keeps that
|
|
50
50
|
selector. A utility without `selector` and without such a variant produces no
|
|
51
|
-
CSS, and [missing-document-target](
|
|
51
|
+
CSS, and [missing-document-target](https://stillwind.dev/docs/lints/missing-document-target) reports it.
|
|
52
52
|
|
|
53
53
|
## Output
|
|
54
54
|
|
|
@@ -63,9 +63,9 @@ Add the string to the page yourself, for example with
|
|
|
63
63
|
[`CSSStyleSheet.replaceSync()`](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/replaceSync)
|
|
64
64
|
and a shadow root's
|
|
65
65
|
[`adoptedStyleSheets`](https://developer.mozilla.org/docs/Web/API/ShadowRoot/adoptedStyleSheets).
|
|
66
|
-
The results in [Built-in utilities and variants](
|
|
66
|
+
The results in [Built-in utilities and variants](https://stillwind.dev/docs/utilities-and-variants)
|
|
67
67
|
leave out the supporting CSS, so they cannot replace this string.
|
|
68
68
|
|
|
69
69
|
To add all styles of a module to a shadow root, including the preflight reset,
|
|
70
70
|
import them from `stillwind/module-css` instead. See
|
|
71
|
-
[Web Components](
|
|
71
|
+
[Web Components](https://stillwind.dev/docs/guides/web-components).
|
package/docs/macros/cva.md
CHANGED
|
@@ -11,7 +11,7 @@ generates the CSS for every option at build time. Calling the factory selects
|
|
|
11
11
|
the compiled classes for the chosen options and returns props for an element.
|
|
12
12
|
|
|
13
13
|
`style.cva()` exists mainly to migrate existing CVA components. For new
|
|
14
|
-
components, see [Reusable styles](
|
|
14
|
+
components, see [Reusable styles](https://stillwind.dev/docs/guides/reusable-styles).
|
|
15
15
|
|
|
16
16
|
## Example
|
|
17
17
|
|
|
@@ -46,11 +46,11 @@ export const props = button({ size: "large" });
|
|
|
46
46
|
```ts
|
|
47
47
|
import { stillwindClassNameObjectCva } from "stillwind/runtime";
|
|
48
48
|
|
|
49
|
-
export const button = stillwindClassNameObjectCva("
|
|
49
|
+
export const button = stillwindClassNameObjectCva("sw_6tzpq", {
|
|
50
50
|
variants: {
|
|
51
51
|
size: {
|
|
52
|
-
small: "
|
|
53
|
-
large: "
|
|
52
|
+
small: "sw_gzwci",
|
|
53
|
+
large: "sw_w6696",
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
defaultVariants: {
|
|
@@ -59,7 +59,7 @@ export const button = stillwindClassNameObjectCva("sw_ilpwh", {
|
|
|
59
59
|
compoundVariants: [
|
|
60
60
|
{
|
|
61
61
|
size: "large",
|
|
62
|
-
class: "
|
|
62
|
+
class: "sw_v1iw3",
|
|
63
63
|
},
|
|
64
64
|
],
|
|
65
65
|
});
|
|
@@ -71,22 +71,22 @@ export const props = button({ size: "large" });
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
```css
|
|
74
|
-
.
|
|
74
|
+
.sw_6tzpq {
|
|
75
75
|
display: inline-flex;
|
|
76
76
|
border-radius: var(--radius-md);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
.
|
|
79
|
+
.sw_gzwci {
|
|
80
80
|
padding-inline: calc(var(--spacing) * 2);
|
|
81
81
|
padding-block: calc(var(--spacing) * 1);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
.
|
|
84
|
+
.sw_w6696 {
|
|
85
85
|
padding-inline: calc(var(--spacing) * 4);
|
|
86
86
|
padding-block: calc(var(--spacing) * 2);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.
|
|
89
|
+
.sw_v1iw3 {
|
|
90
90
|
--tw-font-weight: var(--font-weight-medium);
|
|
91
91
|
font-weight: var(--font-weight-medium);
|
|
92
92
|
}
|
|
@@ -114,11 +114,11 @@ options.
|
|
|
114
114
|
The base and each option value accept utility strings, arrays, objects with
|
|
115
115
|
variant keys, `true`, `false`, `null`, `undefined`, and custom properties.
|
|
116
116
|
|
|
117
|
-
They do not accept `&&`, ternaries, stored [`style()`](style
|
|
117
|
+
They do not accept `&&`, ternaries, stored [`style()`](https://stillwind.dev/docs/macros/style)
|
|
118
118
|
results, refs, animations, or `class` fields. To choose a style at runtime,
|
|
119
119
|
pass a different option to the factory.
|
|
120
|
-
[invalid-cva-input](
|
|
121
|
-
[invalid-cva-config](
|
|
120
|
+
[invalid-cva-input](https://stillwind.dev/docs/lints/invalid-cva-input) reports these values, and
|
|
121
|
+
[invalid-cva-config](https://stillwind.dev/docs/lints/invalid-cva-config) reports a malformed
|
|
122
122
|
configuration.
|
|
123
123
|
|
|
124
124
|
A custom property value can be an expression. The factory evaluates it once,
|
|
@@ -151,5 +151,5 @@ Factory calls stay ordinary JavaScript.
|
|
|
151
151
|
The development build checks the selected values and the classes from other
|
|
152
152
|
stylesheets.
|
|
153
153
|
|
|
154
|
-
See [Migrating from Tailwind CSS](
|
|
154
|
+
See [Migrating from Tailwind CSS](https://stillwind.dev/docs/guides/migrating-from-tailwind#cva) to
|
|
155
155
|
convert existing `cva` calls.
|
package/docs/macros/index.md
CHANGED
|
@@ -11,15 +11,15 @@ and it shows the generated JavaScript and CSS for its examples.
|
|
|
11
11
|
|
|
12
12
|
| Macro | Use it to | Guide |
|
|
13
13
|
| -------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
14
|
-
| [`style()`](style
|
|
15
|
-
| [`style.ref()`](ref
|
|
16
|
-
| [`style.anchorScope()`](anchor-scope
|
|
17
|
-
| [`style.keyframes()`](keyframes
|
|
18
|
-
| [`style.viewTransition()`](view-transition
|
|
19
|
-
| [`style.when()`](when
|
|
20
|
-
| [`style.media()`](media
|
|
21
|
-
| [`style.css()`](css
|
|
22
|
-
| [`style.cva()`](cva
|
|
14
|
+
| [`style()`](https://stillwind.dev/docs/macros/style) | Style an element | [The basics of style()](https://stillwind.dev/docs/guides/style) |
|
|
15
|
+
| [`style.ref()`](https://stillwind.dev/docs/macros/ref) | Style an element from another element's state, size, or position | [Element relationships](https://stillwind.dev/docs/guides/element-relationships) |
|
|
16
|
+
| [`style.anchorScope()`](https://stillwind.dev/docs/macros/anchor-scope) | Limit where an anchor name is visible | [Element relationships](https://stillwind.dev/docs/guides/element-relationships) |
|
|
17
|
+
| [`style.keyframes()`](https://stillwind.dev/docs/macros/keyframes) | Define an animation in a component | [Animations](https://stillwind.dev/docs/guides/animations) |
|
|
18
|
+
| [`style.viewTransition()`](https://stillwind.dev/docs/macros/view-transition) | Style view transition snapshots and name each item | [View transitions](https://stillwind.dev/docs/guides/view-transitions) |
|
|
19
|
+
| [`style.when()`](https://stillwind.dev/docs/macros/when) | Reuse a variant sequence, such as a ref condition | [Element relationships](https://stillwind.dev/docs/guides/element-relationships) |
|
|
20
|
+
| [`style.media()`](https://stillwind.dev/docs/macros/media) | Use a named breakpoint as a media query in JavaScript | [Responsive styles](https://stillwind.dev/docs/guides/responsive-styles) |
|
|
21
|
+
| [`style.css()`](https://stillwind.dev/docs/macros/css) | Compile utilities into a CSS string for a shadow root | [Web Components](https://stillwind.dev/docs/guides/web-components) |
|
|
22
|
+
| [`style.cva()`](https://stillwind.dev/docs/macros/cva) | Migrate components that use `cva` | [Migrating from Tailwind CSS](https://stillwind.dev/docs/guides/migrating-from-tailwind) |
|
|
23
23
|
|
|
24
24
|
Import the macros from the entrypoint of your framework, such as
|
|
25
25
|
`stillwind/react`. The examples on these pages use React.
|
|
@@ -27,5 +27,5 @@ Import the macros from the entrypoint of your framework, such as
|
|
|
27
27
|
Each example shows the source, the compiled code, and the CSS that it adds to
|
|
28
28
|
the stylesheet. In development, Stillwind also adds checks that report invalid
|
|
29
29
|
values at runtime. The compiled code on these pages leaves them out.
|
|
30
|
-
[How styles compile](
|
|
30
|
+
[How styles compile](https://stillwind.dev/docs/concepts/how-styles-compile) explains the generated code in
|
|
31
31
|
general.
|
package/docs/macros/keyframes.md
CHANGED
|
@@ -6,7 +6,7 @@ description: "Define keyframes in a component, and apply them with animation opt
|
|
|
6
6
|
# style.keyframes()
|
|
7
7
|
|
|
8
8
|
`style.keyframes(definition)` defines an animation. Calling the result inside
|
|
9
|
-
[`style()`](style
|
|
9
|
+
[`style()`](https://stillwind.dev/docs/macros/style) applies the animation, and its argument sets
|
|
10
10
|
the animation's options. The compiler generates a unique animation name.
|
|
11
11
|
|
|
12
12
|
## Example
|
|
@@ -27,14 +27,14 @@ export const props = style(fade("duration-300 ease-in-out"));
|
|
|
27
27
|
|
|
28
28
|
```ts
|
|
29
29
|
const fade = undefined;
|
|
30
|
-
export const props = {className:"
|
|
30
|
+
export const props = {className:"sw_tcsva"};
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
### Generated CSS
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
```css
|
|
37
|
-
@keyframes sw-kf-
|
|
37
|
+
@keyframes sw-kf-zylc1 {
|
|
38
38
|
from {
|
|
39
39
|
opacity: 0;
|
|
40
40
|
}
|
|
@@ -44,8 +44,8 @@ export const props = {className:"sw_4y7y6"};
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
.
|
|
48
|
-
animation-name: sw-kf-
|
|
47
|
+
.sw_tcsva {
|
|
48
|
+
animation-name: sw-kf-zylc1;
|
|
49
49
|
animation-duration: .3s;
|
|
50
50
|
animation-timing-function: var(--ease-in-out);
|
|
51
51
|
}
|
|
@@ -78,10 +78,10 @@ The argument is a string literal of animation options. Timing utilities set
|
|
|
78
78
|
animation properties here: `duration-300` sets `animation-duration`, not
|
|
79
79
|
`transition-duration`. A utility that is not an animation option, such as
|
|
80
80
|
`p-4`, produces no CSS, and
|
|
81
|
-
[invalid-animation-option](
|
|
81
|
+
[invalid-animation-option](https://stillwind.dev/docs/lints/invalid-animation-option) reports it.
|
|
82
82
|
|
|
83
83
|
Write the call directly in `style()`. Storing `fade("duration-300")` in a
|
|
84
|
-
variable causes [SW10004](
|
|
84
|
+
variable causes [SW10004](https://stillwind.dev/docs/errors/SW10004).
|
|
85
85
|
|
|
86
86
|
To turn the animation on or off by condition, put the call under a variant, such
|
|
87
87
|
as `{ "motion-safe:": fade("duration-300") }`.
|
|
@@ -94,6 +94,6 @@ The compiler writes every
|
|
|
94
94
|
[`@keyframes`](https://developer.mozilla.org/docs/Web/CSS/Reference/At-rules/@keyframes)
|
|
95
95
|
rule that the calls need, together with the theme values that the frames use.
|
|
96
96
|
|
|
97
|
-
See [Animations](
|
|
98
|
-
[invalid-keyframes-variant](
|
|
97
|
+
See [Animations](https://stillwind.dev/docs/guides/animations) for task-based examples, and
|
|
98
|
+
[invalid-keyframes-variant](https://stillwind.dev/docs/lints/invalid-keyframes-variant) for
|
|
99
99
|
unsupported variants.
|