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.
Files changed (173) hide show
  1. package/CHANGELOG.md +193 -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 +7 -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 +19 -19
  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 +16 -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 +21 -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 +2 -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 +3 -3
  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
@@ -10,7 +10,7 @@ description: "Make the element that has a ref a named container for ref.at() que
10
10
  on the element, and it sets
11
11
  [`container-type`](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/container-type)
12
12
  when you pass a type. Query the container with
13
- [`card.at()`](at.md).
13
+ [`card.at()`](https://stillwind.dev/docs/macros/ref/at).
14
14
 
15
15
  ## Example
16
16
 
@@ -27,19 +27,19 @@ export const container = style(card, card.asContainer("inline-size"), "p-4");
27
27
 
28
28
  ```ts
29
29
  const card = undefined;
30
- export const container = {className:"sw_j0tj8 sw_card_uryy0"};
30
+ export const container = {className:"sw_9kism sw_card_nudp9"};
31
31
  ```
32
32
 
33
33
  ### Generated CSS
34
34
 
35
35
 
36
36
  ```css
37
- .sw_j0tj8 {
37
+ .sw_9kism {
38
38
  padding: calc(var(--spacing) * 4);
39
39
  }
40
40
 
41
- .sw_j0tj8:where(.sw_card_uryy0) {
42
- container-name: sw-c-card-uryy0;
41
+ .sw_9kism:where(.sw_card_nudp9) {
42
+ container-name: sw-c-card-nudp9;
43
43
  container-type: inline-size;
44
44
  }
45
45
  ```
@@ -57,11 +57,11 @@ its value. A type stored in a variable is not accepted.
57
57
 
58
58
  ## Behavior
59
59
 
60
- Pass `card` and `card.asContainer()` in the same [`style()`](../style.md)
60
+ Pass `card` and `card.asContainer()` in the same [`style()`](https://stillwind.dev/docs/macros/style)
61
61
  call. The container declarations apply only to an element that has the ref, and
62
- [missing-ref-attachment](../../lints/missing-ref-attachment.md) reports a call
62
+ [missing-ref-attachment](https://stillwind.dev/docs/lints/missing-ref-attachment) reports a call
63
63
  without it.
64
64
 
65
65
  When another rule on the element also sets `container-name` or `container-type`,
66
- [conflicting-provider-properties](../../lints/conflicting-provider-properties.md)
66
+ [conflicting-provider-properties](https://stillwind.dev/docs/lints/conflicting-provider-properties)
67
67
  reports it.
@@ -8,7 +8,7 @@ description: "Style an element with a container query on the element that has a
8
8
  `card.at(query?)` creates
9
9
  [a container query](https://developer.mozilla.org/docs/Web/CSS/Guides/Containment/Container_queries)
10
10
  on the container that the `card` ref names. Make that element a container with
11
- [`card.asContainer()`](as-container.md).
11
+ [`card.asContainer()`](https://stillwind.dev/docs/macros/ref/as-container).
12
12
 
13
13
  ## Example
14
14
 
@@ -26,21 +26,21 @@ export const child = style({ [card.at("width >= 40rem")]: "grid-cols-2" });
26
26
 
27
27
  ```ts
28
28
  const card = undefined;
29
- export const container = {className:"sw_28iqw sw_card_uryy0"};
30
- export const child = {className:"sw_cunr1"};
29
+ export const container = {className:"sw_osnwd sw_card_nudp9"};
30
+ export const child = {className:"sw_hzszw"};
31
31
  ```
32
32
 
33
33
  ### Generated CSS
34
34
 
35
35
 
36
36
  ```css
37
- .sw_28iqw:where(.sw_card_uryy0) {
38
- container-name: sw-c-card-uryy0;
37
+ .sw_osnwd:where(.sw_card_nudp9) {
38
+ container-name: sw-c-card-nudp9;
39
39
  container-type: inline-size;
40
40
  }
41
41
 
42
- @container sw-c-card-uryy0 (width >= 40rem) {
43
- .sw_cunr1 {
42
+ @container sw-c-card-nudp9 (width >= 40rem) {
43
+ .sw_hzszw {
44
44
  grid-template-columns: repeat(2, minmax(0, 1fr));
45
45
  }
46
46
  }
@@ -62,8 +62,8 @@ Leave out the outer parentheses.
62
62
  Without a query, the condition matches whenever the styled element is inside a
63
63
  container with the name.
64
64
 
65
- Write the call directly as a computed key in [`style()`](../style.md).
66
- To use it in several places, store it with [`style.when()`](../when.md).
65
+ Write the call directly as a computed key in [`style()`](https://stillwind.dev/docs/macros/style).
66
+ To use it in several places, store it with [`style.when()`](https://stillwind.dev/docs/macros/when).
67
67
 
68
- See [Element relationships](../../guides/element-relationships.md#react-to-a-containers-size)
68
+ See [Element relationships](https://stillwind.dev/docs/guides/element-relationships#react-to-a-containers-size)
69
69
  for a task-based example.
@@ -25,21 +25,21 @@ export const title = style({ [card("hover")]: "text-blue-600" });
25
25
 
26
26
  ```ts
27
27
  const card = undefined;
28
- export const container = {className:"sw_vw9g3 sw_card_uryy0"};
29
- export const title = {className:"sw_c67by"};
28
+ export const container = {className:"sw_gky8e sw_card_nudp9"};
29
+ export const title = {className:"sw_0m922"};
30
30
  ```
31
31
 
32
32
  ### Generated CSS
33
33
 
34
34
 
35
35
  ```css
36
- .sw_vw9g3 {
36
+ .sw_gky8e {
37
37
  padding: calc(var(--spacing) * 4);
38
38
  border-radius: var(--radius-lg);
39
39
  }
40
40
 
41
41
  @media (hover: hover) {
42
- .sw_c67by:is(:where(.sw_card_uryy0):hover *) {
42
+ .sw_0m922:is(:where(.sw_card_nudp9):hover *) {
43
43
  color: var(--color-blue-600);
44
44
  }
45
45
  }
@@ -59,7 +59,7 @@ The final colon is optional.
59
59
 
60
60
  ## Where to write it
61
61
 
62
- Write the condition as a computed key of an object in [`style()`](../style.md):
62
+ Write the condition as a computed key of an object in [`style()`](https://stillwind.dev/docs/macros/style):
63
63
 
64
64
  ```ts
65
65
  style({ [card("hover")]: "text-blue-600" });
@@ -73,15 +73,15 @@ style(`${card("hover")}:text-blue-600`);
73
73
  ```
74
74
 
75
75
  To use the same condition in several places, store it with
76
- [`style.when()`](../when.md).
76
+ [`style.when()`](https://stillwind.dev/docs/macros/when).
77
77
 
78
78
  ## Behavior
79
79
 
80
80
  The ref element must be an ancestor of the styled element. To match a sibling or
81
- another element inside a shared ancestor, add [`.in()`](in.md).
81
+ another element inside a shared ancestor, add [`.in()`](https://stillwind.dev/docs/macros/ref/in).
82
82
 
83
83
  The condition only selects elements. It does not attach the ref, so attach it with
84
84
  `style(card)` on the ancestor.
85
85
 
86
- See [Element relationships](../../guides/element-relationships.md#react-to-a-parents-state)
86
+ See [Element relationships](https://stillwind.dev/docs/guides/element-relationships#react-to-a-parents-state)
87
87
  for a task-based example.
@@ -28,27 +28,27 @@ export const text = style({ [trigger("hover").in(card)]: "text-blue-600" });
28
28
  ```ts
29
29
  const card = undefined;
30
30
  const trigger = undefined;
31
- export const container = {className:"sw_fxivy sw_card_uryy0"};
32
- export const button = {className:"sw_92u2q sw_trigger_fvqcy"};
33
- export const text = {className:"sw_yz349"};
31
+ export const container = {className:"sw_dsyoo sw_card_nudp9"};
32
+ export const button = {className:"sw_zycpr sw_trigger_xnhw0"};
33
+ export const text = {className:"sw_hfcxb"};
34
34
  ```
35
35
 
36
36
  ### Generated CSS
37
37
 
38
38
 
39
39
  ```css
40
- .sw_fxivy {
40
+ .sw_dsyoo {
41
41
  padding: calc(var(--spacing) * 4);
42
42
  }
43
43
 
44
- .sw_92u2q {
44
+ .sw_zycpr {
45
45
  padding-inline: calc(var(--spacing) * 4);
46
46
  padding-block: calc(var(--spacing) * 2);
47
47
  border-radius: var(--radius-md);
48
48
  }
49
49
 
50
50
  @media (hover: hover) {
51
- .sw_yz349:is(:where(.sw_card_uryy0):has(:where(.sw_trigger_fvqcy):hover) *) {
51
+ .sw_hfcxb:is(:where(.sw_card_nudp9):has(:where(.sw_trigger_xnhw0):hover) *) {
52
52
  color: var(--color-blue-600);
53
53
  }
54
54
  }
@@ -56,7 +56,7 @@ export const text = {className:"sw_yz349"};
56
56
 
57
57
  ## Inputs
58
58
 
59
- The receiver is a [ref condition](condition.md), such as
59
+ The receiver is a [ref condition](https://stillwind.dev/docs/macros/ref/condition), such as
60
60
  `trigger("hover")` or `trigger()`. The argument is one of these:
61
61
 
62
62
  | Argument | The scope element |
@@ -64,7 +64,7 @@ The receiver is a [ref condition](condition.md), such as
64
64
  | `card` | Has the `card` ref |
65
65
  | `card("focus-within")` | Has the `card` ref and matches the variants |
66
66
 
67
- The argument cannot use `.in()` or [`.at()`](at.md) itself.
67
+ The argument cannot use `.in()` or [`.at()`](https://stillwind.dev/docs/macros/ref/at) itself.
68
68
 
69
69
  ## Behavior
70
70
 
@@ -74,8 +74,8 @@ styled element itself.
74
74
  Calling `.in()` more than once adds each scope as another condition, and every
75
75
  condition must match.
76
76
 
77
- Write the whole chain directly as a computed key in [`style()`](../style.md).
78
- To use it in several places, store it with [`style.when()`](../when.md).
77
+ Write the whole chain directly as a computed key in [`style()`](https://stillwind.dev/docs/macros/style).
78
+ To use it in several places, store it with [`style.when()`](https://stillwind.dev/docs/macros/when).
79
79
 
80
- See [Element relationships](../../guides/element-relationships.md#react-to-a-siblings-state)
80
+ See [Element relationships](https://stillwind.dev/docs/guides/element-relationships#react-to-a-siblings-state)
81
81
  for a task-based example.
@@ -28,27 +28,27 @@ export const child = style({
28
28
 
29
29
  ```ts
30
30
  const card = undefined;
31
- export const container = {className:"sw_28iqw sw_card_uryy0"};
32
- export const child = {className:"sw_6hxbo"};
31
+ export const container = {className:"sw_osnwd sw_card_nudp9"};
32
+ export const child = {className:"sw_duzby"};
33
33
  ```
34
34
 
35
35
  ### Generated CSS
36
36
 
37
37
 
38
38
  ```css
39
- .sw_28iqw:where(.sw_card_uryy0) {
40
- container-name: sw-c-card-uryy0;
39
+ .sw_osnwd:where(.sw_card_nudp9) {
40
+ container-name: sw-c-card-nudp9;
41
41
  container-type: inline-size;
42
42
  }
43
43
 
44
- @container sw-c-card-uryy0 (width >= 40rem) {
45
- .sw_6hxbo {
44
+ @container sw-c-card-nudp9 (width >= 40rem) {
45
+ .sw_duzby {
46
46
  grid-template-columns: repeat(2, minmax(0, 1fr));
47
47
  }
48
48
  }
49
49
 
50
50
  @media (hover: hover) {
51
- .sw_6hxbo:is(:where(.sw_card_uryy0):hover *) {
51
+ .sw_duzby:is(:where(.sw_card_nudp9):hover *) {
52
52
  color: var(--color-blue-600);
53
53
  }
54
54
  }
@@ -92,17 +92,17 @@ nearest one.
92
92
 
93
93
  | Method | Where to write it | Effect |
94
94
  | ---------------------------------------------------------- | ------------------------------------------ | ------------------------------------------------------ |
95
- | `ref` | A [`style()`](../style.md) argument | Attaches the ref to the element |
96
- | [`ref()`](condition.md) | A computed key in `style()` | Matches inside the ref element, optionally in a state |
97
- | [`ref().in()`](in.md) | After a ref condition | Matches inside a shared ancestor, such as for siblings |
98
- | [`ref.at()`](at.md) | A computed key in `style()` | Matches a container query on the ref element |
99
- | [`ref.asContainer()`](as-container.md) | A `style()` argument | Makes the ref element a named container |
100
- | [`ref.asAnchor()`](as-anchor.md) | A `style()` argument | Makes the ref element a named anchor |
101
- | [`ref.positionAnchor()`](position-anchor.md) | A `style()` argument | Positions the styled element against the anchor |
95
+ | `ref` | A [`style()`](https://stillwind.dev/docs/macros/style) argument | Attaches the ref to the element |
96
+ | [`ref()`](https://stillwind.dev/docs/macros/ref/condition) | A computed key in `style()` | Matches inside the ref element, optionally in a state |
97
+ | [`ref().in()`](https://stillwind.dev/docs/macros/ref/in) | After a ref condition | Matches inside a shared ancestor, such as for siblings |
98
+ | [`ref.at()`](https://stillwind.dev/docs/macros/ref/at) | A computed key in `style()` | Matches a container query on the ref element |
99
+ | [`ref.asContainer()`](https://stillwind.dev/docs/macros/ref/as-container) | A `style()` argument | Makes the ref element a named container |
100
+ | [`ref.asAnchor()`](https://stillwind.dev/docs/macros/ref/as-anchor) | A `style()` argument | Makes the ref element a named anchor |
101
+ | [`ref.positionAnchor()`](https://stillwind.dev/docs/macros/ref/position-anchor) | A `style()` argument | Positions the styled element against the anchor |
102
102
 
103
103
  Write each method call directly in `style()`. You cannot store the result of a
104
104
  method call in a variable and use it later. To reuse a ref condition or a
105
- container query, store it with [`style.when()`](../when.md).
105
+ container query, store it with [`style.when()`](https://stillwind.dev/docs/macros/when).
106
106
 
107
107
  ## Generated code
108
108
 
@@ -112,5 +112,5 @@ call chooses among several refs at runtime, the generated code keeps the fields
112
112
  that the choice needs. The compiled code reads those fields directly. In
113
113
  development, Stillwind checks them first. The code does not watch the DOM.
114
114
 
115
- See [Element relationships](../../guides/element-relationships.md) for task-based
115
+ See [Element relationships](https://stillwind.dev/docs/guides/element-relationships) for task-based
116
116
  examples.
@@ -31,20 +31,20 @@ export const popover = style(
31
31
 
32
32
  ```ts
33
33
  const trigger = undefined;
34
- export const button = {className:"sw_l9spr sw_trigger_xnn7w"};
35
- export const popover = {className:"sw_fu7et"};
34
+ export const button = {className:"sw_6x3gz sw_trigger_xnhw0"};
35
+ export const popover = {className:"sw_6gq48"};
36
36
  ```
37
37
 
38
38
  ### Generated CSS
39
39
 
40
40
 
41
41
  ```css
42
- .sw_l9spr:where(.sw_trigger_xnn7w) {
43
- anchor-name: --sw-a-trigger-xnn7w;
42
+ .sw_6x3gz:where(.sw_trigger_xnhw0) {
43
+ anchor-name: --sw-a-trigger-xnhw0;
44
44
  }
45
45
 
46
- .sw_fu7et {
47
- position-anchor: --sw-a-trigger-xnn7w;
46
+ .sw_6gq48 {
47
+ position-anchor: --sw-a-trigger-xnhw0;
48
48
  position: absolute;
49
49
  top: anchor(bottom);
50
50
  left: anchor(left);
@@ -58,10 +58,10 @@ export const popover = {className:"sw_fu7et"};
58
58
  ## Behavior
59
59
 
60
60
  The styled element does not need the `trigger` ref. The anchor element needs it,
61
- together with [`trigger.asAnchor()`](as-anchor.md).
61
+ together with [`trigger.asAnchor()`](https://stillwind.dev/docs/macros/ref/as-anchor).
62
62
 
63
- Write the call directly in [`style()`](../style.md). You cannot store it
63
+ Write the call directly in [`style()`](https://stillwind.dev/docs/macros/style). You cannot store it
64
64
  in a variable and use it later.
65
65
 
66
- See [Element relationships](../../guides/element-relationships.md#position-an-element-at-an-anchor)
66
+ See [Element relationships](https://stillwind.dev/docs/guides/element-relationships#position-an-element-at-an-anchor)
67
67
  for a complete example with an anchor scope.
@@ -23,16 +23,16 @@ other frameworks receive `class` and `style`. Spread the result onto the element
23
23
  | A stored `style()` result | `base` | Adds the classes of the base |
24
24
 
25
25
  `false`, `null`, and `undefined` add nothing. Ref, keyframes, and view transition
26
- calls are also inputs; see [`style.ref()`](ref/index.md),
27
- [`style.keyframes()`](keyframes.md), and
28
- [`style.viewTransition()`](view-transition.md).
26
+ calls are also inputs; see [`style.ref()`](https://stillwind.dev/docs/macros/ref),
27
+ [`style.keyframes()`](https://stillwind.dev/docs/macros/keyframes), and
28
+ [`style.viewTransition()`](https://stillwind.dev/docs/macros/view-transition).
29
29
 
30
30
  Write utility names as literals. The compiler reads them from the source, so a
31
31
  name that your code builds at runtime produces no CSS.
32
32
 
33
33
  Inside an object with variant keys, write utilities only. A `class` field, a
34
34
  custom property, a ref, or a stored `style()` result belongs outside that object.
35
- [invalid-rule-group-input](../lints/invalid-rule-group-input.md) reports these
35
+ [invalid-rule-group-input](https://stillwind.dev/docs/lints/invalid-rule-group-input) reports these
36
36
  inputs.
37
37
 
38
38
  ## Static input
@@ -51,14 +51,14 @@ export const props = style("rounded-md p-4 text-blue-600");
51
51
  ### Compiled code
52
52
 
53
53
  ```ts
54
- export const props = {className:"sw_ad8bv"};
54
+ export const props = {className:"sw_7hd93"};
55
55
  ```
56
56
 
57
57
  ### Generated CSS
58
58
 
59
59
 
60
60
  ```css
61
- .sw_ad8bv {
61
+ .sw_7hd93 {
62
62
  padding: calc(var(--spacing) * 4);
63
63
  color: var(--color-blue-600);
64
64
  border-radius: var(--radius-md);
@@ -88,18 +88,18 @@ export const props = style("p-4", active && "bg-blue-500", {
88
88
  import { stillwindClsx } from "stillwind/runtime";
89
89
 
90
90
  declare const active: boolean;
91
- export const props = {className:stillwindClsx("sw_4td0b",(active) && ("sw_dq3t9")),style:{"--progress":"0.5"}};
91
+ export const props = {className:stillwindClsx("sw_gmm8m",(active) && ("sw_661jk")),style:{"--progress":"0.5"}};
92
92
  ```
93
93
 
94
94
  ### Generated CSS
95
95
 
96
96
 
97
97
  ```css
98
- .sw_4td0b {
98
+ .sw_gmm8m {
99
99
  padding: calc(var(--spacing) * 4);
100
100
  }
101
101
 
102
- .sw_dq3t9 {
102
+ .sw_661jk {
103
103
  background-color: var(--color-blue-500);
104
104
  }
105
105
  ```
@@ -112,7 +112,7 @@ Stillwind imports a checked version that reports invalid values.
112
112
  A stored `style()` result passed to another call is a base. The compiler places
113
113
  the base's CSS before the CSS generated by the call that receives it. The later
114
114
  declarations win when the other cascade criteria, such as specificity and
115
- importance, are equal. See [CSS ordering](../concepts/css-ordering.md).
115
+ importance, are equal. See [CSS ordering](https://stillwind.dev/docs/concepts/css-ordering).
116
116
 
117
117
  ### Source
118
118
 
@@ -128,20 +128,20 @@ export const props = style(base, "p-4 bg-blue-600 text-white");
128
128
  ```ts
129
129
  import { stillwindClassNameObjectClassKey, stillwindClassNameObjectMerge, stillwindClassNameObjectToFragment } from "stillwind/runtime";
130
130
 
131
- const base = {className:"sw_lqeqi"};
132
- export const props = stillwindClassNameObjectMerge({[stillwindClassNameObjectClassKey]:"sw_cb2cz"},stillwindClassNameObjectToFragment((base)));
131
+ const base = {className:"sw_8pxd9"};
132
+ export const props = stillwindClassNameObjectMerge({[stillwindClassNameObjectClassKey]:"sw_sba7k"},stillwindClassNameObjectToFragment((base)));
133
133
  ```
134
134
 
135
135
  ### Generated CSS
136
136
 
137
137
 
138
138
  ```css
139
- .sw_lqeqi {
139
+ .sw_8pxd9 {
140
140
  padding: calc(var(--spacing) * 2);
141
141
  border-radius: var(--radius-md);
142
142
  }
143
143
 
144
- .sw_cb2cz {
144
+ .sw_sba7k {
145
145
  padding: calc(var(--spacing) * 4);
146
146
  color: var(--color-white);
147
147
  background-color: var(--color-blue-600);
@@ -150,12 +150,12 @@ export const props = stillwindClassNameObjectMerge({[stillwindClassNameObjectCla
150
150
 
151
151
  A base can come from any framework entrypoint and passes on its classes only.
152
152
  The receiving call returns its own framework's props. The base's inline style and
153
- custom properties do not carry over, and [invalid-style-composition](../lints/invalid-style-composition.md)
153
+ custom properties do not carry over, and [invalid-style-composition](https://stillwind.dev/docs/lints/invalid-style-composition)
154
154
  reports them. Set them in the call that receives the base.
155
155
 
156
156
  Store a base in a variable before you pass it. A `style()` call written
157
157
  directly inside another call produces no CSS, and
158
- [invalid-style-input](../lints/invalid-style-input.md) reports it.
158
+ [invalid-style-input](https://stillwind.dev/docs/lints/invalid-style-input) reports it.
159
159
 
160
160
  ## Argument order
161
161
 
@@ -181,11 +181,11 @@ arguments set the same custom property, the later one wins.
181
181
 
182
182
  Do not reorder arguments to fix a conflict. Reordering does not change the
183
183
  result, and it does not remove a finding of
184
- [conflicting-utilities](../lints/conflicting-utilities.md),
185
- [ambiguous-style-base-order](../lints/ambiguous-style-base-order.md), or
186
- [interfering-imported-style-base](../lints/interfering-imported-style-base.md).
184
+ [conflicting-utilities](https://stillwind.dev/docs/lints/conflicting-utilities),
185
+ [ambiguous-style-base-order](https://stillwind.dev/docs/lints/ambiguous-style-base-order), or
186
+ [interfering-imported-style-base](https://stillwind.dev/docs/lints/interfering-imported-style-base).
187
187
  Remove the utility that should not apply, or build the overriding style on the
188
- other style. [CSS ordering](../concepts/css-ordering.md) describes the complete
188
+ other style. [CSS ordering](https://stillwind.dev/docs/concepts/css-ordering) describes the complete
189
189
  rules.
190
190
 
191
191
  ## How props combine at runtime
@@ -203,9 +203,9 @@ combines the inputs:
203
203
  The compiler can evaluate arguments in any order, and it can skip arguments
204
204
  whose result is not used. Arguments must not perform I/O, change shared state,
205
205
  or depend on how often they run. Calculate such values before the call.
206
- [mutating-macro-argument](../lints/mutating-macro-argument.md) and
207
- [suspending-macro-argument](../lints/suspending-macro-argument.md) report the
206
+ [mutating-macro-argument](https://stillwind.dev/docs/lints/mutating-macro-argument) and
207
+ [suspending-macro-argument](https://stillwind.dev/docs/lints/suspending-macro-argument) report the
208
208
  cases that the CLI can detect.
209
209
 
210
- See [The basics of style()](../guides/style.md) and
211
- [Reusable styles](../guides/reusable-styles.md) for task-based guides.
210
+ See [The basics of style()](https://stillwind.dev/docs/guides/style) and
211
+ [Reusable styles](https://stillwind.dev/docs/guides/reusable-styles) for task-based guides.
@@ -6,7 +6,7 @@ description: "Define view transition snapshot styles, and give each element a tr
6
6
  # style.viewTransition()
7
7
 
8
8
  `style.viewTransition(definition)` defines the styles of view transition
9
- snapshots. Passing the result to [`style()`](style.md) adds its
9
+ snapshots. Passing the result to [`style()`](https://stillwind.dev/docs/macros/style) adds its
10
10
  transition class to the element. Calling `.for(key)` also gives the element a
11
11
  [`view-transition-name`](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/view-transition-name).
12
12
 
@@ -28,28 +28,28 @@ export const props = style(transition.for("product-42"));
28
28
 
29
29
  ```ts
30
30
  const transition = undefined;
31
- export const props = {className:"sw_krt7u"};
31
+ export const props = {className:"sw_vue90"};
32
32
  ```
33
33
 
34
34
  ### Generated CSS
35
35
 
36
36
 
37
37
  ```css
38
- ::view-transition-old(.sw-vt-szy06) {
38
+ ::view-transition-old(.sw-vt-6lpts) {
39
39
  animation-duration: .15s;
40
40
  }
41
41
 
42
- ::view-transition-new(.sw-vt-szy06) {
42
+ ::view-transition-new(.sw-vt-6lpts) {
43
43
  animation-delay: .15s;
44
44
  animation-duration: .15s;
45
45
  }
46
46
 
47
- .sw_krt7u {
48
- view-transition-class: sw-vt-szy06;
47
+ .sw_vue90 {
48
+ view-transition-class: sw-vt-6lpts;
49
49
  }
50
50
 
51
- .sw_krt7u {
52
- view-transition-name: sw-vt-szy06-product-42;
51
+ .sw_vue90 {
52
+ view-transition-name: sw-vt-6lpts-product-42;
53
53
  }
54
54
  ```
55
55
 
@@ -118,23 +118,23 @@ import { stillwindViewTransitionName } from "stillwind/runtime";
118
118
  const transition = undefined;
119
119
 
120
120
  declare const id: string;
121
- export const props = {className:"sw_zhaz3",style:{"view-transition-name":stillwindViewTransitionName("sw-vt-szy06",id)}};
121
+ export const props = {className:"sw_gpjrb",style:{"view-transition-name":stillwindViewTransitionName("sw-vt-6lpts",id)}};
122
122
  ```
123
123
 
124
124
  ### Generated CSS
125
125
 
126
126
 
127
127
  ```css
128
- ::view-transition-old(.sw-vt-szy06) {
128
+ ::view-transition-old(.sw-vt-6lpts) {
129
129
  animation-duration: .15s;
130
130
  }
131
131
 
132
- ::view-transition-new(.sw-vt-szy06) {
132
+ ::view-transition-new(.sw-vt-6lpts) {
133
133
  animation-duration: .15s;
134
134
  }
135
135
 
136
- .sw_zhaz3 {
137
- view-transition-class: sw-vt-szy06;
136
+ .sw_gpjrb {
137
+ view-transition-class: sw-vt-6lpts;
138
138
  }
139
139
  ```
140
140
 
@@ -152,9 +152,9 @@ Pass the other definitions without `.for()`, such as `style(fade, slide.for(id))
152
152
 
153
153
  Transition classes from separate `style()` calls do not combine. Each call sets
154
154
  the whole `view-transition-class` list, so one list replaces the other.
155
- [split-view-transition-class](../lints/split-view-transition-class.md) and
156
- [duplicate-view-transition-name](../lints/duplicate-view-transition-name.md)
155
+ [split-view-transition-class](https://stillwind.dev/docs/lints/split-view-transition-class) and
156
+ [duplicate-view-transition-name](https://stillwind.dev/docs/lints/duplicate-view-transition-name)
157
157
  report these cases.
158
158
 
159
- See [View transitions](../guides/view-transitions.md) to start a transition
159
+ See [View transitions](https://stillwind.dev/docs/guides/view-transitions) to start a transition
160
160
  from your application.
@@ -6,9 +6,9 @@ description: "Store a variant sequence or alternatives, such as a ref condition,
6
6
  # style.when()
7
7
 
8
8
  `style.when(...variants)` stores a sequence of variants in a variable. Use the
9
- variable in [`style()`](style.md) where you would write the variants.
9
+ variable in [`style()`](https://stillwind.dev/docs/macros/style) where you would write the variants.
10
10
  This helps when several elements need the same
11
- [ref condition](ref/condition.md), because a ref call must otherwise
11
+ [ref condition](https://stillwind.dev/docs/macros/ref/condition), because a ref call must otherwise
12
12
  be repeated in each `style()` call.
13
13
 
14
14
  ## Example
@@ -32,29 +32,29 @@ export const arrow = style(`${cardHover}:translate-x-1`);
32
32
  const card = undefined;
33
33
  const cardHover = undefined;
34
34
 
35
- export const root = {className:"sw_hd4rc sw_card_uryy0"};
36
- export const title = {className:"sw_fqux0"};
37
- export const arrow = {className:"sw_zu1vf"};
35
+ export const root = {className:"sw_1tsgv sw_card_nudp9"};
36
+ export const title = {className:"sw_0m922"};
37
+ export const arrow = {className:"sw_nlo24"};
38
38
  ```
39
39
 
40
40
  ### Generated CSS
41
41
 
42
42
 
43
43
  ```css
44
- .sw_hd4rc {
44
+ .sw_1tsgv {
45
45
  border-radius: var(--radius-lg);
46
46
  border-style: var(--tw-border-style);
47
47
  border-width: 1px;
48
48
  }
49
49
 
50
50
  @media (hover: hover) {
51
- .sw_fqux0:is(:where(.sw_card_uryy0):hover *) {
51
+ .sw_0m922:is(:where(.sw_card_nudp9):hover *) {
52
52
  color: var(--color-blue-600);
53
53
  }
54
54
  }
55
55
 
56
56
  @media (hover: hover) {
57
- .sw_zu1vf:is(:where(.sw_card_uryy0):hover *) {
57
+ .sw_nlo24:is(:where(.sw_card_nudp9):hover *) {
58
58
  --tw-translate-x: calc(var(--spacing) * 1);
59
59
  translate: var(--tw-translate-x) var(--tw-translate-y);
60
60
  }
@@ -72,8 +72,8 @@ The final colon is optional.
72
72
  | Form | Example |
73
73
  | ------------------------------------------------------------- | --------------------------------------- |
74
74
  | A string literal of variants | `style.when("hover:md")` |
75
- | A [ref condition](ref/condition.md), with `.in()` | `style.when(card("hover").in(list))` |
76
- | A [container query](ref/at.md) | `style.when(card.at("width >= 40rem"))` |
75
+ | A [ref condition](https://stillwind.dev/docs/macros/ref/condition), with `.in()` | `style.when(card("hover").in(list))` |
76
+ | A [container query](https://stillwind.dev/docs/macros/ref/at) | `style.when(card.at("width >= 40rem"))` |
77
77
  | A template literal whose interpolations are complete variants | ``style.when(`md:${card("hover")}`)`` |
78
78
  | Another stored variant | `style.when(cardHover)` |
79
79
 
@@ -85,7 +85,7 @@ Write the call as the initial value of a variable, outside other Stillwind
85
85
  calls. Declare a stored variant before another `style.when()` call uses it.
86
86
  A `style()` call can use one that is declared later in the module.
87
87
 
88
- [invalid-stored-variant](../lints/invalid-stored-variant.md) reports an
88
+ [invalid-stored-variant](https://stillwind.dev/docs/lints/invalid-stored-variant) reports an
89
89
  argument that is not a sequence of variants.
90
90
 
91
91
  ## Alternatives
@@ -102,7 +102,7 @@ export const title = style({ [active]: "text-blue-600" });
102
102
  A use means the same as writing the use once for each argument, in argument
103
103
  order. `title` is equal to
104
104
  `style({ "hover:": "text-blue-600", [card("focus-within")]: "text-blue-600" })`.
105
- Unlike an [`or(...)`](../guides/style.md#match-any-of-several-variants)
105
+ Unlike an [`or(...)`](https://stillwind.dev/docs/guides/style#match-any-of-several-variants)
106
106
  variant, the arguments can be ref conditions and container queries.
107
107
 
108
108
  ## Uses
@@ -119,7 +119,7 @@ refer to one stored variant. A choice at runtime, such as
119
119
  `[active ? cardHover : cardFocus]`, does not work, because the compiler
120
120
  expands the variants at build time. Write a key for each stored variant instead.
121
121
 
122
- [`style.cva()`](cva.md) values and [`.in()`](ref/in.md)
122
+ [`style.cva()`](https://stillwind.dev/docs/macros/cva) values and [`.in()`](https://stillwind.dev/docs/macros/ref/in)
123
123
  do not accept a stored variant.
124
124
 
125
125
  ## Output