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.
Files changed (175) hide show
  1. package/CHANGELOG.md +212 -0
  2. package/css/builtin-variants/tw-relationship.css +4 -4
  3. package/css/builtins.css +1 -1
  4. package/dist/frameworks/alpine.d.ts +1 -1
  5. package/dist/frameworks/astro.d.ts +1 -1
  6. package/dist/frameworks/lit.d.ts +1 -1
  7. package/dist/frameworks/preact.d.ts +1 -1
  8. package/dist/frameworks/qwik.d.ts +1 -1
  9. package/dist/frameworks/solid.d.ts +1 -1
  10. package/dist/frameworks/svelte.d.ts +1 -1
  11. package/dist/frameworks/vanilla.d.ts +1 -1
  12. package/dist/frameworks/vue.d.ts +1 -1
  13. package/docs/at-rules/apply.md +5 -5
  14. package/docs/at-rules/custom-variant.md +12 -12
  15. package/docs/at-rules/index.md +19 -19
  16. package/docs/at-rules/plugin.md +13 -7
  17. package/docs/at-rules/registry-directives.md +9 -9
  18. package/docs/at-rules/slot.md +6 -6
  19. package/docs/at-rules/stillwind-css-template.md +7 -7
  20. package/docs/at-rules/stillwind-property.md +10 -10
  21. package/docs/at-rules/stillwind-registry.md +18 -18
  22. package/docs/at-rules/stillwind-require-properties.md +9 -9
  23. package/docs/at-rules/stillwind-slot.md +6 -6
  24. package/docs/at-rules/stillwind-undef-arbitrary-property.md +9 -9
  25. package/docs/at-rules/stillwind-undef-utility.md +10 -10
  26. package/docs/at-rules/stillwind-undef-variant.md +6 -6
  27. package/docs/at-rules/theme.md +23 -23
  28. package/docs/at-rules/utility.md +30 -30
  29. package/docs/at-rules/variant.md +6 -6
  30. package/docs/cli.md +7 -7
  31. package/docs/concepts/css-ordering.md +17 -17
  32. package/docs/concepts/how-styles-compile.md +14 -14
  33. package/docs/concepts/stylesheets.md +4 -4
  34. package/docs/configuration.md +29 -29
  35. package/docs/editors.md +8 -8
  36. package/docs/errors/SW01003.md +1 -1
  37. package/docs/errors/SW10001.md +1 -1
  38. package/docs/errors/SW10002.md +1 -1
  39. package/docs/errors/SW10004.md +6 -6
  40. package/docs/errors/SW10005.md +1 -1
  41. package/docs/errors/SW11001.md +1 -1
  42. package/docs/errors/SW11003.md +1 -1
  43. package/docs/errors/SW12001.md +2 -2
  44. package/docs/errors/SW12002.md +1 -1
  45. package/docs/errors/SW13001.md +1 -1
  46. package/docs/errors/SW13003.md +2 -2
  47. package/docs/errors/SW14001.md +1 -1
  48. package/docs/errors/SW14003.md +4 -4
  49. package/docs/errors/SW14004.md +2 -2
  50. package/docs/errors/SW14005.md +1 -1
  51. package/docs/errors/SW14006.md +1 -1
  52. package/docs/errors/SW14007.md +2 -2
  53. package/docs/errors/SW14008.md +1 -1
  54. package/docs/errors/SW30001.md +1 -1
  55. package/docs/errors/SW31001.md +1 -1
  56. package/docs/errors/SW31004.md +1 -1
  57. package/docs/errors/SW33005.md +1 -1
  58. package/docs/errors/SW34002.md +1 -1
  59. package/docs/errors/SW90001.md +1 -1
  60. package/docs/errors/SW90005.md +1 -1
  61. package/docs/errors/SW90006.md +1 -1
  62. package/docs/errors/index.md +72 -72
  63. package/docs/formatters.md +5 -5
  64. package/docs/guides/animations.md +7 -8
  65. package/docs/guides/design-systems.md +7 -7
  66. package/docs/guides/element-relationships.md +15 -19
  67. package/docs/guides/lint-adoption.md +5 -5
  68. package/docs/guides/migrating-from-css.md +11 -11
  69. package/docs/guides/migrating-from-tailwind.md +21 -16
  70. package/docs/guides/recommended-practices.md +18 -18
  71. package/docs/guides/responsive-styles.md +7 -7
  72. package/docs/guides/reusable-styles.md +5 -5
  73. package/docs/guides/runtime-conditions.md +6 -6
  74. package/docs/guides/style.md +15 -15
  75. package/docs/guides/tailwind-compatibility.md +27 -21
  76. package/docs/guides/view-transitions.md +9 -11
  77. package/docs/guides/web-components.md +4 -4
  78. package/docs/index.md +14 -12
  79. package/docs/integrations.md +3 -3
  80. package/docs/lints/ambiguous-style-base-order.md +2 -2
  81. package/docs/lints/bypassed-undefinition.md +3 -3
  82. package/docs/lints/clamped-value.md +1 -1
  83. package/docs/lints/conflicting-provider-properties.md +2 -2
  84. package/docs/lints/conflicting-utilities.md +67 -2
  85. package/docs/lints/document-scoped-selector.md +1 -1
  86. package/docs/lints/duplicate-definition.md +3 -3
  87. package/docs/lints/duplicate-utility.md +2 -2
  88. package/docs/lints/duplicate-view-transition-name.md +3 -3
  89. package/docs/lints/ignored-definition-condition.md +2 -2
  90. package/docs/lints/ignored-tailwind-feature.md +3 -3
  91. package/docs/lints/implicit-nesting-selector.md +2 -2
  92. package/docs/lints/incompatible-property-value.md +3 -3
  93. package/docs/lints/incompatible-theme-value.md +1 -1
  94. package/docs/lints/index.md +74 -74
  95. package/docs/lints/ineffective-anchor-scope.md +2 -2
  96. package/docs/lints/interfering-imported-style-base.md +1 -1
  97. package/docs/lints/invalid-animation-option.md +3 -3
  98. package/docs/lints/invalid-css-directive.md +3 -3
  99. package/docs/lints/invalid-css-import.md +2 -2
  100. package/docs/lints/invalid-css-input.md +4 -4
  101. package/docs/lints/invalid-cva-config.md +2 -2
  102. package/docs/lints/invalid-cva-input.md +4 -4
  103. package/docs/lints/invalid-keyframes-definition.md +2 -2
  104. package/docs/lints/invalid-keyframes-use.md +2 -2
  105. package/docs/lints/invalid-keyframes-variant.md +4 -4
  106. package/docs/lints/invalid-lint-suppression.md +3 -3
  107. package/docs/lints/invalid-marker-use.md +2 -2
  108. package/docs/lints/invalid-media-query.md +4 -4
  109. package/docs/lints/invalid-ref-input.md +4 -4
  110. package/docs/lints/invalid-rule-group-input.md +2 -2
  111. package/docs/lints/invalid-runtime-condition.md +3 -3
  112. package/docs/lints/invalid-stored-variant.md +3 -3
  113. package/docs/lints/invalid-style-composition.md +2 -2
  114. package/docs/lints/invalid-style-input.md +2 -2
  115. package/docs/lints/invalid-theme-reference.md +3 -3
  116. package/docs/lints/invalid-utility.md +3 -3
  117. package/docs/lints/invalid-variant.md +2 -2
  118. package/docs/lints/invalid-view-transition-definition.md +2 -2
  119. package/docs/lints/invalid-view-transition-use.md +2 -2
  120. package/docs/lints/invalid-view-transition-variant.md +3 -3
  121. package/docs/lints/mismatched-framework-import.md +3 -3
  122. package/docs/lints/missing-document-target.md +2 -2
  123. package/docs/lints/missing-ref-attachment.md +4 -4
  124. package/docs/lints/missing-view-transition-name.md +3 -3
  125. package/docs/lints/mutating-macro-argument.md +2 -2
  126. package/docs/lints/no-arbitrary-breakpoints.md +2 -2
  127. package/docs/lints/no-arbitrary-colors.md +2 -2
  128. package/docs/lints/no-arbitrary-spacing.md +1 -1
  129. package/docs/lints/no-class-property.md +3 -3
  130. package/docs/lints/no-important.md +2 -2
  131. package/docs/lints/no-restricted-declarations.md +1 -1
  132. package/docs/lints/no-restricted-length-units.md +1 -1
  133. package/docs/lints/no-restricted-theme-tokens.md +1 -1
  134. package/docs/lints/no-restricted-utilities.md +2 -2
  135. package/docs/lints/prefer-canonical-utilities.md +2 -2
  136. package/docs/lints/prefer-direct-styling.md +3 -3
  137. package/docs/lints/prefer-logical-properties.md +22 -5
  138. package/docs/lints/prefer-sorted-utilities.md +2 -2
  139. package/docs/lints/prefer-typed-relationships.md +3 -3
  140. package/docs/lints/prefer-typed-variables.md +1 -1
  141. package/docs/lints/prefer-variant-directive.md +3 -3
  142. package/docs/lints/redundant-variant.md +2 -2
  143. package/docs/lints/repeated-nesting-selector.md +2 -2
  144. package/docs/lints/runtime-condition-requires-css-if.md +3 -3
  145. package/docs/lints/split-view-transition-class.md +3 -3
  146. package/docs/lints/suspending-macro-argument.md +2 -2
  147. package/docs/lints/unknown-utility.md +4 -4
  148. package/docs/lints/unknown-variant.md +2 -2
  149. package/docs/lints/unmatched-host-selector.md +2 -2
  150. package/docs/lints/unsatisfiable-variants.md +1 -1
  151. package/docs/lints/unused-lint-suppression.md +1 -1
  152. package/docs/lints/unverified-style-base.md +2 -2
  153. package/docs/macros/anchor-scope.md +13 -13
  154. package/docs/macros/css.md +7 -7
  155. package/docs/macros/cva.md +13 -13
  156. package/docs/macros/index.md +10 -10
  157. package/docs/macros/keyframes.md +9 -9
  158. package/docs/macros/media.md +2 -2
  159. package/docs/macros/ref/as-anchor.md +11 -11
  160. package/docs/macros/ref/as-container.md +8 -8
  161. package/docs/macros/ref/at.md +10 -10
  162. package/docs/macros/ref/condition.md +8 -8
  163. package/docs/macros/ref/in.md +11 -11
  164. package/docs/macros/ref/index.md +16 -16
  165. package/docs/macros/ref/position-anchor.md +9 -9
  166. package/docs/macros/style.md +24 -24
  167. package/docs/macros/view-transition.md +16 -16
  168. package/docs/macros/when.md +13 -13
  169. package/docs/plugins/iconify.md +5 -5
  170. package/docs/plugins/index.md +4 -4
  171. package/docs/utilities-and-variants.md +6 -6
  172. package/docs/why.md +13 -15
  173. package/package.json +8 -6
  174. package/skills/migrate-to-stillwind/SKILL.md +36 -2
  175. 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.md).
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](../configuration.md#lint) to change the severity or options.
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`](../at-rules/apply.md) statement, it can
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](../configuration.md#lint) to change the severity or options.
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()`](../macros/style.md) call, as in the example.
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](../configuration.md#suppression-comments) with the
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](../configuration.md#lint) to change the severity or options.
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](../configuration.md#suppression-comments).
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](../concepts/stylesheets.md#logical-axis-utilities).
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](../configuration.md#lint) to change the severity or options.
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](../configuration.md#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](../configuration.md#lint) to change the severity or options.
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()`](../macros/ref/in.md) with a ref on a shared ancestor.
36
+ [`.in()`](https://stillwind.dev/docs/macros/ref/in) with a ref on a shared ancestor.
37
37
 
38
- See [Element relationships](../guides/element-relationships.md).
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](../configuration.md#lint) to change the severity or options.
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](../configuration.md#lint) to change the severity or options.
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`](../at-rules/utility.md)
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`](../at-rules/variant.md) and the name of
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](../configuration.md#lint) to change the severity or options.
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.md) instead.
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](../configuration.md#lint) to change the severity or options.
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()`](../macros/ref/in.md).
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](../configuration.md#lint) to change the severity or options.
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](../guides/runtime-conditions.md#enable-native-css-if) and
50
- [Configuration](../configuration.md#generated-css).
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](../configuration.md#lint) to change the severity or options.
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()`](../macros/style.md) calls, such as a base style and the call that
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()`](../macros/view-transition.md) call, as in the example. You can
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](../configuration.md#lint) to change the severity or options.
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()`](../macros/style.md) or another macro. The compiler can move or skip
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](../configuration.md#lint) to change the severity or options.
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`](../at-rules/theme.md), or define the
34
- utility with [`@utility`](../at-rules/utility.md).
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](../utilities-and-variants.md) looks up the
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](../configuration.md#lint) to change the severity or options.
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`](../at-rules/custom-variant.md) in your stylesheet.
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](../configuration.md#lint) to change the severity or options.
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()`](../guides/runtime-conditions.md). Custom properties inherit into a
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](../configuration.md#lint) to change the severity or options.
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](../configuration.md#lint) to change the severity or options.
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](../configuration.md#lint) to change the severity or options.
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()`](../macros/style.md) call created it, such as a value declared as
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](../configuration.md#lint) to change the severity or options.
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:"sw_im2u7 sw_trigger_xnn7w"};
32
- export const scope = {className:"sw_tcyj3"};
33
- export const popover = {className:"sw_vqbik"};
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
- .sw_im2u7:where(.sw_trigger_xnn7w) {
41
- anchor-name: --sw-a-trigger-xnn7w;
40
+ .sw_7u6im:where(.sw_trigger_xnhw0) {
41
+ anchor-name: --sw-a-trigger-xnhw0;
42
42
  }
43
43
 
44
- .sw_tcyj3 {
45
- anchor-scope: --sw-a-trigger-xnn7w;
44
+ .sw_at8ic {
45
+ anchor-scope: --sw-a-trigger-xnhw0;
46
46
  }
47
47
 
48
- .sw_vqbik {
49
- position-anchor: --sw-a-trigger-xnn7w;
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](../lints/ineffective-anchor-scope.md) reports both.
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.md) conditions.
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.md).
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](../guides/element-relationships.md#position-an-element-at-an-anchor)
92
+ See [Element relationships](https://stillwind.dev/docs/guides/element-relationships#position-an-element-at-an-anchor)
93
93
  for a complete example.
@@ -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.md), it adds nothing to the page's stylesheet. You
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) * 4);color:var(--color-blue-600)}";
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](../lints/invalid-css-input.md)
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`](../at-rules/stillwind-css-template.md) in your stylesheet; defaults to `default` |
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](../lints/missing-document-target.md) reports it.
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](../utilities-and-variants.md)
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](../guides/web-components.md).
71
+ [Web Components](https://stillwind.dev/docs/guides/web-components).
@@ -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](../guides/reusable-styles.md).
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("sw_ilpwh", {
49
+ export const button = stillwindClassNameObjectCva("sw_6tzpq", {
50
50
  variants: {
51
51
  size: {
52
- small: "sw_h1m4c",
53
- large: "sw_8bi9g",
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: "sw_xlk4i",
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
- .sw_ilpwh {
74
+ .sw_6tzpq {
75
75
  display: inline-flex;
76
76
  border-radius: var(--radius-md);
77
77
  }
78
78
 
79
- .sw_h1m4c {
79
+ .sw_gzwci {
80
80
  padding-inline: calc(var(--spacing) * 2);
81
81
  padding-block: calc(var(--spacing) * 1);
82
82
  }
83
83
 
84
- .sw_8bi9g {
84
+ .sw_w6696 {
85
85
  padding-inline: calc(var(--spacing) * 4);
86
86
  padding-block: calc(var(--spacing) * 2);
87
87
  }
88
88
 
89
- .sw_xlk4i {
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.md)
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](../lints/invalid-cva-input.md) reports these values, and
121
- [invalid-cva-config](../lints/invalid-cva-config.md) reports a malformed
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](../guides/migrating-from-tailwind.md#cva) to
154
+ See [Migrating from Tailwind CSS](https://stillwind.dev/docs/guides/migrating-from-tailwind#cva) to
155
155
  convert existing `cva` calls.
@@ -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.md) | Style an element | [The basics of style()](../guides/style.md) |
15
- | [`style.ref()`](ref/index.md) | Style an element from another element's state, size, or position | [Element relationships](../guides/element-relationships.md) |
16
- | [`style.anchorScope()`](anchor-scope.md) | Limit where an anchor name is visible | [Element relationships](../guides/element-relationships.md) |
17
- | [`style.keyframes()`](keyframes.md) | Define an animation in a component | [Animations](../guides/animations.md) |
18
- | [`style.viewTransition()`](view-transition.md) | Style view transition snapshots and name each item | [View transitions](../guides/view-transitions.md) |
19
- | [`style.when()`](when.md) | Reuse a variant sequence, such as a ref condition | [Element relationships](../guides/element-relationships.md) |
20
- | [`style.media()`](media.md) | Use a named breakpoint as a media query in JavaScript | [Responsive styles](../guides/responsive-styles.md) |
21
- | [`style.css()`](css.md) | Compile utilities into a CSS string for a shadow root | [Web Components](../guides/web-components.md) |
22
- | [`style.cva()`](cva.md) | Migrate components that use `cva` | [Migrating from Tailwind CSS](../guides/migrating-from-tailwind.md) |
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](../concepts/how-styles-compile.md) explains the generated code in
30
+ [How styles compile](https://stillwind.dev/docs/concepts/how-styles-compile) explains the generated code in
31
31
  general.
@@ -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.md) applies the animation, and its argument sets
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:"sw_4y7y6"};
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-74r1m {
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
- .sw_4y7y6 {
48
- animation-name: sw-kf-74r1m;
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](../lints/invalid-animation-option.md) reports it.
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](../errors/SW10004.md).
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](../guides/animations.md) for task-based examples, and
98
- [invalid-keyframes-variant](../lints/invalid-keyframes-variant.md) for
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.