stillwind 0.0.0 → 0.1.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 (305) hide show
  1. package/AGENTS_TEMPLATE.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +166 -0
  4. package/TAILWINDCSS-MIT-LICENSE +21 -0
  5. package/css/builtin-metadata/sw-motion-properties.css +186 -0
  6. package/css/builtin-metadata/tw-legacy-metadata.css +36 -0
  7. package/css/builtin-metadata/tw-properties.css +944 -0
  8. package/css/builtin-metadata/tw-registry-metadata.css +52 -0
  9. package/css/builtin-metadata/tw-relationship-metadata.css +10 -0
  10. package/css/builtin-utilities/sw-motion-contexts.css +1043 -0
  11. package/css/builtin-utilities/tw-backgrounds.css +606 -0
  12. package/css/builtin-utilities/tw-borders.css +954 -0
  13. package/css/builtin-utilities/tw-effects.css +1209 -0
  14. package/css/builtin-utilities/tw-flex-grid.css +749 -0
  15. package/css/builtin-utilities/tw-interactivity.css +680 -0
  16. package/css/builtin-utilities/tw-layout.css +943 -0
  17. package/css/builtin-utilities/tw-masks.css +1268 -0
  18. package/css/builtin-utilities/tw-motion.css +142 -0
  19. package/css/builtin-utilities/tw-spacing-sizing.css +621 -0
  20. package/css/builtin-utilities/tw-svg.css +50 -0
  21. package/css/builtin-utilities/tw-transforms.css +652 -0
  22. package/css/builtin-utilities/tw-typography.css +720 -0
  23. package/css/builtin-variants/sw-conditional.css +5 -0
  24. package/css/builtin-variants/sw-document.css +13 -0
  25. package/css/builtin-variants/tw-conditional.css +187 -0
  26. package/css/builtin-variants/tw-dynamic-selector.css +49 -0
  27. package/css/builtin-variants/tw-relationship.css +41 -0
  28. package/css/builtin-variants/tw-state.css +159 -0
  29. package/css/builtin-variants/tw-structural.css +121 -0
  30. package/css/builtins.css +111 -0
  31. package/css/preflight.css +401 -0
  32. package/css/templates.css +40 -0
  33. package/css/theme.css +546 -0
  34. package/css/utilities.css +9 -0
  35. package/dist/class-object-D24FFYqO.js +6 -0
  36. package/dist/class-object-D24FFYqO.js.map +1 -0
  37. package/dist/class-object-D7ZGJOf_.d.ts +9 -0
  38. package/dist/class-string-CQHnc9GN.d.ts +9 -0
  39. package/dist/class-string-Db8-oI4q.js +6 -0
  40. package/dist/class-string-Db8-oI4q.js.map +1 -0
  41. package/dist/config.d.ts +1 -0
  42. package/dist/config.js +2 -0
  43. package/dist/css.d.ts +100 -0
  44. package/dist/css.js +143 -0
  45. package/dist/css.js.map +1 -0
  46. package/dist/cva-BwX07CFw.js +204 -0
  47. package/dist/cva-BwX07CFw.js.map +1 -0
  48. package/dist/cva-DSpDNBYi.d.ts +9 -0
  49. package/dist/development-DttPQc71.d.ts +27 -0
  50. package/dist/development-J-JCSIm0.js +111 -0
  51. package/dist/development-J-JCSIm0.js.map +1 -0
  52. package/dist/frameworks/alpine.d.ts +20 -0
  53. package/dist/frameworks/alpine.js +18 -0
  54. package/dist/frameworks/alpine.js.map +1 -0
  55. package/dist/frameworks/astro.d.ts +3 -0
  56. package/dist/frameworks/astro.js +1 -0
  57. package/dist/frameworks/lit.d.ts +21 -0
  58. package/dist/frameworks/lit.js +38 -0
  59. package/dist/frameworks/lit.js.map +1 -0
  60. package/dist/frameworks/preact.d.ts +3 -0
  61. package/dist/frameworks/preact.js +1 -0
  62. package/dist/frameworks/qwik.d.ts +3 -0
  63. package/dist/frameworks/qwik.js +1 -0
  64. package/dist/frameworks/react.d.ts +10 -0
  65. package/dist/frameworks/react.js +6 -0
  66. package/dist/frameworks/react.js.map +1 -0
  67. package/dist/frameworks/solid.d.ts +3 -0
  68. package/dist/frameworks/solid.js +1 -0
  69. package/dist/frameworks/svelte.d.ts +3 -0
  70. package/dist/frameworks/svelte.js +1 -0
  71. package/dist/frameworks/vanilla.d.ts +27 -0
  72. package/dist/frameworks/vanilla.js +3 -0
  73. package/dist/frameworks/vue.d.ts +3 -0
  74. package/dist/frameworks/vue.js +1 -0
  75. package/dist/index-RwVFpxhE.d.ts +815 -0
  76. package/dist/macro/index.d.ts +2 -0
  77. package/dist/macro/index.js +1 -0
  78. package/dist/module-css.d.ts +30 -0
  79. package/dist/module-css.js +23 -0
  80. package/dist/module-css.js.map +1 -0
  81. package/dist/runtime/class-name-object-development.d.ts +10 -0
  82. package/dist/runtime/class-name-object-development.js +18 -0
  83. package/dist/runtime/class-name-object-development.js.map +1 -0
  84. package/dist/runtime/class-name-object.d.ts +16 -0
  85. package/dist/runtime/class-name-object.js +31 -0
  86. package/dist/runtime/class-name-object.js.map +1 -0
  87. package/dist/runtime/class-object-development.d.ts +10 -0
  88. package/dist/runtime/class-object-development.js +18 -0
  89. package/dist/runtime/class-object-development.js.map +1 -0
  90. package/dist/runtime/class-object.d.ts +16 -0
  91. package/dist/runtime/class-object.js +31 -0
  92. package/dist/runtime/class-object.js.map +1 -0
  93. package/dist/runtime/class-string-development.d.ts +10 -0
  94. package/dist/runtime/class-string-development.js +18 -0
  95. package/dist/runtime/class-string-development.js.map +1 -0
  96. package/dist/runtime/class-string.d.ts +16 -0
  97. package/dist/runtime/class-string.js +31 -0
  98. package/dist/runtime/class-string.js.map +1 -0
  99. package/dist/shared-B9IQXU6P.d.ts +32 -0
  100. package/dist/style-BV4ctkni.js +78 -0
  101. package/dist/style-BV4ctkni.js.map +1 -0
  102. package/dist/style-fTQbsVWZ.js +41 -0
  103. package/dist/style-fTQbsVWZ.js.map +1 -0
  104. package/docs/agents.md +76 -0
  105. package/docs/at-rules/apply.md +93 -0
  106. package/docs/at-rules/custom-variant.md +127 -0
  107. package/docs/at-rules/index.md +75 -0
  108. package/docs/at-rules/plugin.md +71 -0
  109. package/docs/at-rules/registry-directives.md +181 -0
  110. package/docs/at-rules/slot.md +58 -0
  111. package/docs/at-rules/stillwind-css-template.md +126 -0
  112. package/docs/at-rules/stillwind-property.md +133 -0
  113. package/docs/at-rules/stillwind-registry.md +115 -0
  114. package/docs/at-rules/stillwind-require-properties.md +91 -0
  115. package/docs/at-rules/stillwind-slot.md +85 -0
  116. package/docs/at-rules/stillwind-undef-arbitrary-property.md +75 -0
  117. package/docs/at-rules/stillwind-undef-utility.md +87 -0
  118. package/docs/at-rules/stillwind-undef-variant.md +55 -0
  119. package/docs/at-rules/theme.md +304 -0
  120. package/docs/at-rules/utility.md +286 -0
  121. package/docs/at-rules/variant.md +91 -0
  122. package/docs/concepts/css-ordering.md +245 -0
  123. package/docs/concepts/how-styles-compile.md +132 -0
  124. package/docs/configuration.md +298 -0
  125. package/docs/errors/SW01001.md +51 -0
  126. package/docs/errors/SW01002.md +52 -0
  127. package/docs/errors/SW01003.md +69 -0
  128. package/docs/errors/SW02001.md +23 -0
  129. package/docs/errors/SW02002.md +51 -0
  130. package/docs/errors/SW03001.md +71 -0
  131. package/docs/errors/SW03002.md +79 -0
  132. package/docs/errors/SW03003.md +36 -0
  133. package/docs/errors/SW10001.md +34 -0
  134. package/docs/errors/SW10002.md +36 -0
  135. package/docs/errors/SW10003.md +30 -0
  136. package/docs/errors/SW10004.md +39 -0
  137. package/docs/errors/SW10005.md +35 -0
  138. package/docs/errors/SW11001.md +37 -0
  139. package/docs/errors/SW11002.md +65 -0
  140. package/docs/errors/SW11003.md +20 -0
  141. package/docs/errors/SW12001.md +43 -0
  142. package/docs/errors/SW12002.md +42 -0
  143. package/docs/errors/SW13001.md +35 -0
  144. package/docs/errors/SW13002.md +33 -0
  145. package/docs/errors/SW13003.md +18 -0
  146. package/docs/errors/SW13004.md +45 -0
  147. package/docs/errors/SW14001.md +44 -0
  148. package/docs/errors/SW14002.md +47 -0
  149. package/docs/errors/SW14003.md +38 -0
  150. package/docs/errors/SW14004.md +48 -0
  151. package/docs/errors/SW14005.md +51 -0
  152. package/docs/errors/SW14006.md +19 -0
  153. package/docs/errors/SW14007.md +35 -0
  154. package/docs/errors/SW14008.md +41 -0
  155. package/docs/errors/SW15001.md +18 -0
  156. package/docs/errors/SW15002.md +19 -0
  157. package/docs/errors/SW15003.md +16 -0
  158. package/docs/errors/SW30001.md +21 -0
  159. package/docs/errors/SW30002.md +18 -0
  160. package/docs/errors/SW30003.md +17 -0
  161. package/docs/errors/SW30004.md +18 -0
  162. package/docs/errors/SW31001.md +20 -0
  163. package/docs/errors/SW31002.md +17 -0
  164. package/docs/errors/SW31003.md +18 -0
  165. package/docs/errors/SW31004.md +20 -0
  166. package/docs/errors/SW31005.md +18 -0
  167. package/docs/errors/SW31006.md +17 -0
  168. package/docs/errors/SW31007.md +18 -0
  169. package/docs/errors/SW31008.md +16 -0
  170. package/docs/errors/SW31009.md +18 -0
  171. package/docs/errors/SW31010.md +16 -0
  172. package/docs/errors/SW31011.md +17 -0
  173. package/docs/errors/SW32001.md +18 -0
  174. package/docs/errors/SW32002.md +45 -0
  175. package/docs/errors/SW32003.md +43 -0
  176. package/docs/errors/SW32004.md +17 -0
  177. package/docs/errors/SW32005.md +40 -0
  178. package/docs/errors/SW32006.md +18 -0
  179. package/docs/errors/SW32007.md +20 -0
  180. package/docs/errors/SW33001.md +17 -0
  181. package/docs/errors/SW33002.md +17 -0
  182. package/docs/errors/SW33003.md +17 -0
  183. package/docs/errors/SW33004.md +17 -0
  184. package/docs/errors/SW33005.md +20 -0
  185. package/docs/errors/SW34001.md +18 -0
  186. package/docs/errors/SW34002.md +17 -0
  187. package/docs/errors/SW34003.md +18 -0
  188. package/docs/errors/SW90001.md +17 -0
  189. package/docs/errors/SW90002.md +18 -0
  190. package/docs/errors/SW90003.md +17 -0
  191. package/docs/errors/SW90004.md +17 -0
  192. package/docs/errors/SW90005.md +16 -0
  193. package/docs/errors/SW90006.md +17 -0
  194. package/docs/errors/SW90007.md +17 -0
  195. package/docs/errors/SW90008.md +17 -0
  196. package/docs/errors/index.md +125 -0
  197. package/docs/guides/animations.md +73 -0
  198. package/docs/guides/design-systems.md +119 -0
  199. package/docs/guides/element-relationships.md +136 -0
  200. package/docs/guides/lint-adoption.md +128 -0
  201. package/docs/guides/migrating-from-css.md +126 -0
  202. package/docs/guides/migrating-from-tailwind.md +179 -0
  203. package/docs/guides/recommended-practices.md +338 -0
  204. package/docs/guides/responsive-styles.md +103 -0
  205. package/docs/guides/reusable-styles.md +110 -0
  206. package/docs/guides/style.md +181 -0
  207. package/docs/guides/tailwind-compatibility.md +126 -0
  208. package/docs/guides/view-transitions.md +84 -0
  209. package/docs/guides/web-components.md +216 -0
  210. package/docs/index.md +136 -0
  211. package/docs/integrations.md +190 -0
  212. package/docs/lints/ambiguous-style-base-order.md +50 -0
  213. package/docs/lints/bypassed-undefinition.md +50 -0
  214. package/docs/lints/clamped-value.md +44 -0
  215. package/docs/lints/conflicting-provider-properties.md +47 -0
  216. package/docs/lints/conflicting-utilities.md +55 -0
  217. package/docs/lints/document-scoped-selector.md +45 -0
  218. package/docs/lints/duplicate-definition.md +44 -0
  219. package/docs/lints/duplicate-utility.md +44 -0
  220. package/docs/lints/duplicate-view-transition-name.md +45 -0
  221. package/docs/lints/ignored-definition-condition.md +51 -0
  222. package/docs/lints/ignored-tailwind-feature.md +62 -0
  223. package/docs/lints/incompatible-property-value.md +60 -0
  224. package/docs/lints/incompatible-theme-value.md +46 -0
  225. package/docs/lints/index.md +140 -0
  226. package/docs/lints/ineffective-anchor-scope.md +46 -0
  227. package/docs/lints/interfering-imported-style-base.md +57 -0
  228. package/docs/lints/invalid-animation-option.md +47 -0
  229. package/docs/lints/invalid-css-directive.md +43 -0
  230. package/docs/lints/invalid-css-import.md +43 -0
  231. package/docs/lints/invalid-css-input.md +45 -0
  232. package/docs/lints/invalid-cva-config.md +46 -0
  233. package/docs/lints/invalid-cva-input.md +50 -0
  234. package/docs/lints/invalid-keyframes-definition.md +47 -0
  235. package/docs/lints/invalid-keyframes-use.md +47 -0
  236. package/docs/lints/invalid-keyframes-variant.md +48 -0
  237. package/docs/lints/invalid-lint-suppression.md +47 -0
  238. package/docs/lints/invalid-marker-use.md +53 -0
  239. package/docs/lints/invalid-media-query.md +52 -0
  240. package/docs/lints/invalid-ref-input.md +49 -0
  241. package/docs/lints/invalid-rule-group-input.md +58 -0
  242. package/docs/lints/invalid-runtime-condition.md +67 -0
  243. package/docs/lints/invalid-style-composition.md +52 -0
  244. package/docs/lints/invalid-style-input.md +47 -0
  245. package/docs/lints/invalid-theme-reference.md +52 -0
  246. package/docs/lints/invalid-utility.md +44 -0
  247. package/docs/lints/invalid-variant.md +45 -0
  248. package/docs/lints/invalid-view-transition-definition.md +46 -0
  249. package/docs/lints/invalid-view-transition-use.md +46 -0
  250. package/docs/lints/invalid-view-transition-variant.md +51 -0
  251. package/docs/lints/mismatched-framework-import.md +47 -0
  252. package/docs/lints/missing-document-target.md +44 -0
  253. package/docs/lints/missing-ref-attachment.md +44 -0
  254. package/docs/lints/missing-view-transition-name.md +46 -0
  255. package/docs/lints/mutating-macro-argument.md +48 -0
  256. package/docs/lints/no-arbitrary-breakpoints.md +50 -0
  257. package/docs/lints/no-arbitrary-colors.md +51 -0
  258. package/docs/lints/no-arbitrary-spacing.md +57 -0
  259. package/docs/lints/no-class-property.md +58 -0
  260. package/docs/lints/no-important.md +50 -0
  261. package/docs/lints/no-restricted-declarations.md +76 -0
  262. package/docs/lints/no-restricted-length-units.md +73 -0
  263. package/docs/lints/no-restricted-theme-tokens.md +73 -0
  264. package/docs/lints/no-restricted-utilities.md +73 -0
  265. package/docs/lints/prefer-canonical-utilities.md +69 -0
  266. package/docs/lints/prefer-direct-styling.md +47 -0
  267. package/docs/lints/prefer-explicit-nesting-selector.md +42 -0
  268. package/docs/lints/prefer-logical-properties.md +49 -0
  269. package/docs/lints/prefer-sorted-utilities.md +46 -0
  270. package/docs/lints/prefer-typed-relationships.md +48 -0
  271. package/docs/lints/prefer-typed-variables.md +43 -0
  272. package/docs/lints/prefer-variant-directive.md +59 -0
  273. package/docs/lints/redundant-variant.md +50 -0
  274. package/docs/lints/repeated-nesting-selector.md +59 -0
  275. package/docs/lints/runtime-condition-requires-css-if.md +59 -0
  276. package/docs/lints/split-view-transition-class.md +47 -0
  277. package/docs/lints/suspending-macro-argument.md +46 -0
  278. package/docs/lints/unknown-utility.md +47 -0
  279. package/docs/lints/unknown-variant.md +42 -0
  280. package/docs/lints/unsatisfiable-variants.md +42 -0
  281. package/docs/lints/unused-lint-suppression.md +57 -0
  282. package/docs/lints/unverified-style-base.md +64 -0
  283. package/docs/macros/anchor-scope.md +90 -0
  284. package/docs/macros/css.md +68 -0
  285. package/docs/macros/cva.md +153 -0
  286. package/docs/macros/index.md +30 -0
  287. package/docs/macros/keyframes.md +98 -0
  288. package/docs/macros/media.md +65 -0
  289. package/docs/macros/ref/as-anchor.md +70 -0
  290. package/docs/macros/ref/as-container.md +64 -0
  291. package/docs/macros/ref/at.md +68 -0
  292. package/docs/macros/ref/condition.md +86 -0
  293. package/docs/macros/ref/in.md +81 -0
  294. package/docs/macros/ref/index.md +115 -0
  295. package/docs/macros/ref/position-anchor.md +64 -0
  296. package/docs/macros/style.md +185 -0
  297. package/docs/macros/view-transition.md +159 -0
  298. package/docs/utilities.md +35 -0
  299. package/docs/why.md +144 -0
  300. package/index.css +7 -0
  301. package/package.json +135 -8
  302. package/skills/migrate-to-stillwind/SKILL.md +81 -0
  303. package/skills/setup-stillwind/SKILL.md +51 -0
  304. package/skills/stillwind/SKILL.md +54 -0
  305. package/index.js +0 -1
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: "missing-view-transition-name"
3
+ description: "Reports a view transition applied without .for()."
4
+ ---
5
+
6
+ # missing-view-transition-name
7
+
8
+ This rule reports a `style()` call that applies a view transition without
9
+ `.for()`. The transition adds its class, but the element has no
10
+ `view-transition-name`, so the browser does not capture it.
11
+
12
+ ## Reported
13
+
14
+ ```tsx
15
+ const transition = style.viewTransition({ old: "duration-150" });
16
+ style(transition);
17
+ ```
18
+
19
+ > missing-view-transition-name: a view transition class without a name does not participate; add .for(key) or declare view-transition-name
20
+ >
21
+ > Example:2:1
22
+
23
+ ## Fixed
24
+
25
+ ```tsx
26
+ const transition = style.viewTransition({ old: "duration-150" });
27
+ style(transition.for("card"));
28
+ ```
29
+
30
+ ## How to fix
31
+
32
+ - Call `.for()` with a key that stays the same for the item before and after the
33
+ update, such as its ID.
34
+ - When the call combines several transitions, call `.for()` on one of them.
35
+
36
+ The rule does not check that keys are unique across the page.
37
+
38
+ ## Rule settings
39
+
40
+ | Preset | Severity |
41
+ | --- | --- |
42
+ | `recommended` | warn |
43
+ | `strict` | deny |
44
+ | `stylistic` | off |
45
+
46
+ [Configure lint](../configuration.md#lint) to change the severity or options.
@@ -0,0 +1,48 @@
1
+ ---
2
+ title: "mutating-macro-argument"
3
+ description: "Reports a state update inside an argument of style() or another macro."
4
+ ---
5
+
6
+ # mutating-macro-argument
7
+
8
+ This rule reports an assignment or another state update inside an argument of
9
+ `style()` or another macro. The compiler can evaluate arguments in any order and
10
+ can skip arguments whose result is not used, so the update may run in a
11
+ different order or not at all.
12
+
13
+ ## Reported
14
+
15
+ ```tsx
16
+ let count = 0;
17
+ style({ "--count": count++ });
18
+ ```
19
+
20
+ > mutating-macro-argument: macro arguments must be pure; perform assignments, updates, and deletes before the macro call
21
+ >
22
+ > Example:2:20
23
+
24
+ ## Fixed
25
+
26
+ ```tsx
27
+ let count = 0;
28
+ const previous = count++;
29
+ style({ "--count": previous });
30
+ ```
31
+
32
+ ## How to fix
33
+
34
+ - Run the update before the call, and pass the result, as in the example.
35
+ - The rule detects updates that it can see in the source. A function that changes
36
+ state internally is not reported, so keep such calls out of the arguments too.
37
+
38
+ See [Side effects in arguments](../macros/style.md#side-effects-in-arguments).
39
+
40
+ ## Rule settings
41
+
42
+ | Preset | Severity |
43
+ | --- | --- |
44
+ | `recommended` | deny |
45
+ | `strict` | deny |
46
+ | `stylistic` | off |
47
+
48
+ [Configure lint](../configuration.md#lint) to change the severity or options.
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: "no-arbitrary-breakpoints"
3
+ description: "Reports viewport widths written as arbitrary values, such as min-[713px]:."
4
+ ---
5
+
6
+ # no-arbitrary-breakpoints
7
+
8
+ This rule reports a viewport width written as an arbitrary value, such as
9
+ `min-[713px]:`. The CSS works, but other components and JavaScript cannot refer
10
+ to the same width by name. No preset enables this rule.
11
+
12
+ ## Reported
13
+
14
+ ```tsx
15
+ style("min-[713px]:p-4");
16
+ ```
17
+
18
+ > no-arbitrary-breakpoints: variant `min-[713px]` uses an arbitrary breakpoint `(width >= 713px)`; use a named variant
19
+ >
20
+ > Example:1:8
21
+
22
+ ## Fixed
23
+
24
+ ```tsx
25
+ style("sidebar:p-4");
26
+ ```
27
+
28
+ ## How to fix
29
+
30
+ Name the width in your theme after the layout change that it causes, and use the
31
+ name as a variant, as in the example:
32
+
33
+ ```css
34
+ @theme {
35
+ --breakpoint-sidebar: 713px;
36
+ }
37
+ ```
38
+
39
+ If a default breakpoint such as `md:` fits the design, use it instead. To use the
40
+ same width in JavaScript, pass the name to [style.media()](../macros/media.md).
41
+
42
+ ## Rule settings
43
+
44
+ | Preset | Severity |
45
+ | --- | --- |
46
+ | `recommended` | off |
47
+ | `strict` | off |
48
+ | `stylistic` | off |
49
+
50
+ [Configure lint](../configuration.md#lint) to change the severity or options.
@@ -0,0 +1,51 @@
1
+ ---
2
+ title: "no-arbitrary-colors"
3
+ description: "Reports colors written as arbitrary values, such as bg-[#123456]."
4
+ ---
5
+
6
+ # no-arbitrary-colors
7
+
8
+ This rule reports a color written as an arbitrary value, such as `bg-[#123456]`.
9
+ The CSS works, but the color does not come from your theme, so a theme change
10
+ does not reach it. No preset enables this rule.
11
+
12
+ ## Reported
13
+
14
+ ```tsx
15
+ style("bg-[#123456]");
16
+ ```
17
+
18
+ > no-arbitrary-colors: arbitrary color `#123456` is forbidden for `background-color`; use a theme token or custom property
19
+ >
20
+ > Example:1:8
21
+
22
+ ## Fixed
23
+
24
+ ```tsx
25
+ style("bg-brand");
26
+ ```
27
+
28
+ ## How to fix
29
+
30
+ Add the color to your theme with a name for its role, and use that name, as in
31
+ the example:
32
+
33
+ ```css
34
+ @theme {
35
+ --color-brand: #123456;
36
+ }
37
+ ```
38
+
39
+ If the color already exists in the theme, use its name instead. To stop
40
+ components from using the default palette directly, also enable
41
+ [no-restricted-theme-tokens](no-restricted-theme-tokens.md).
42
+
43
+ ## Rule settings
44
+
45
+ | Preset | Severity |
46
+ | --- | --- |
47
+ | `recommended` | off |
48
+ | `strict` | off |
49
+ | `stylistic` | off |
50
+
51
+ [Configure lint](../configuration.md#lint) to change the severity or options.
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: "no-arbitrary-spacing"
3
+ description: "Reports margin, padding, and gap written as arbitrary values, such as p-[13px]."
4
+ ---
5
+
6
+ # no-arbitrary-spacing
7
+
8
+ This rule reports margin, padding, or gap written as an arbitrary value, such as
9
+ `p-[13px]`. The CSS works, but the value is not on your spacing scale. No preset
10
+ enables this rule.
11
+
12
+ ## Reported
13
+
14
+ ```tsx
15
+ style("p-[13px]");
16
+ ```
17
+
18
+ > no-arbitrary-spacing: arbitrary spacing `13px` is forbidden for `padding`; use the spacing scale or a custom property
19
+ >
20
+ > Example:1:8
21
+
22
+ ## Fixed
23
+
24
+ ```css
25
+ @theme {
26
+ --spacing-panel: 13px;
27
+ }
28
+ ```
29
+
30
+ ```tsx
31
+ style("p-panel");
32
+ ```
33
+
34
+ ## How to fix
35
+
36
+ - Give the value a theme name for its role, as in the example. This keeps the
37
+ same 13px padding while making it available to other components.
38
+ - Use an existing spacing value if the design allows a different size.
39
+
40
+ ## Options
41
+
42
+ `properties` lists more CSS properties to check, in addition to margin, padding,
43
+ and gap.
44
+
45
+ ## Rule settings
46
+
47
+ | Preset | Severity |
48
+ | --- | --- |
49
+ | `recommended` | off |
50
+ | `strict` | off |
51
+ | `stylistic` | off |
52
+
53
+ | Option | Default |
54
+ | --- | --- |
55
+ | `properties` | `[]` |
56
+
57
+ [Configure lint](../configuration.md#lint) to change the severity or options.
@@ -0,0 +1,58 @@
1
+ ---
2
+ title: "no-class-property"
3
+ description: "Reports the class field, which adds classes without generated CSS."
4
+ ---
5
+
6
+ # no-class-property
7
+
8
+ This rule reports a `class` field in `style()`. A `class` field adds classes that
9
+ another stylesheet defines, so Stillwind does not check them. Enable this rule
10
+ when every style in the project must come from utilities. No preset enables it.
11
+
12
+ ## Reported
13
+
14
+ ```css
15
+ .card {
16
+ border-radius: 8px;
17
+ padding: 16px;
18
+ }
19
+ ```
20
+
21
+ ```tsx
22
+ style({ class: "card" });
23
+ ```
24
+
25
+ > no-class-property: `class` contributions are forbidden in style objects; use utilities, custom properties, or CSS variants
26
+ >
27
+ > Example:1:16
28
+
29
+ ## Fixed
30
+
31
+ ```css
32
+ @utility card {
33
+ border-radius: 8px;
34
+ padding: 16px;
35
+ }
36
+ ```
37
+
38
+ ```tsx
39
+ style("card");
40
+ ```
41
+
42
+ ## How to fix
43
+
44
+ - Move the class's declarations into a utility, as in the example. Keep the same
45
+ declarations so the component's appearance does not change.
46
+ - If a third-party library needs its own class, keep the `class` field and add a
47
+ [suppression comment](../configuration.md#suppression-comments) with the
48
+ reason.
49
+
50
+ ## Rule settings
51
+
52
+ | Preset | Severity |
53
+ | --- | --- |
54
+ | `recommended` | off |
55
+ | `strict` | off |
56
+ | `stylistic` | off |
57
+
58
+ [Configure lint](../configuration.md#lint) to change the severity or options.
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: "no-important"
3
+ description: "Reports utilities with the important modifier, such as p-4!."
4
+ ---
5
+
6
+ # no-important
7
+
8
+ This rule reports each use of a utility with the `!` modifier once, even when it
9
+ emits several important declarations. It also reports `!important` declarations
10
+ in utility definitions. An important declaration wins over styles that would
11
+ normally override it, which makes later changes harder. No preset enables this rule.
12
+
13
+ ## Reported
14
+
15
+ ```tsx
16
+ const base = style("p-2");
17
+ style(base, "p-4!");
18
+ ```
19
+
20
+ > no-important: the `!` utility modifier is forbidden
21
+ >
22
+ > Example:2:14
23
+
24
+ ## Fixed
25
+
26
+ ```tsx
27
+ const base = style("p-2");
28
+ style(base, "p-4");
29
+ ```
30
+
31
+ ## How to fix
32
+
33
+ - To override a shared style, pass it as a base. The later utilities win without
34
+ `!`, as in the example.
35
+ - To win over a stylesheet that you do not control, use the `important` field of
36
+ the project instead. See [Configuration](../configuration.md#generated-css).
37
+
38
+ ## Rule settings
39
+
40
+ | Preset | Severity |
41
+ | --- | --- |
42
+ | `recommended` | off |
43
+ | `strict` | off |
44
+ | `stylistic` | off |
45
+
46
+ | Option | Default |
47
+ | --- | --- |
48
+ | `checkImplementation` | `true` |
49
+
50
+ [Configure lint](../configuration.md#lint) to change the severity or options.
@@ -0,0 +1,76 @@
1
+ ---
2
+ title: "no-restricted-declarations"
3
+ description: "Reports utilities that produce CSS declarations that your project forbids."
4
+ ---
5
+
6
+ # no-restricted-declarations
7
+
8
+ This rule reports a utility that produces a CSS declaration that your project
9
+ forbids. It checks the generated declarations, so it also catches other
10
+ utilities and arbitrary values that produce the same declaration. The rule is off
11
+ until you list declarations.
12
+
13
+ ## Configuration
14
+
15
+ ```json
16
+ {
17
+ "lint": {
18
+ "rules": {
19
+ "no-restricted-declarations": {
20
+ "severity": "warn",
21
+ "rules": [
22
+ {
23
+ "properties": ["transition-property"],
24
+ "values": ["all"]
25
+ }
26
+ ]
27
+ }
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ ## Reported
34
+
35
+ ```tsx
36
+ style("transition-all");
37
+ ```
38
+
39
+ > no-restricted-declarations: declaration `transition-property: all` is forbidden
40
+ >
41
+ > Example:1:8
42
+
43
+ ## Fixed
44
+
45
+ ```tsx
46
+ style("transition-colors");
47
+ ```
48
+
49
+ ## How to fix
50
+
51
+ Name the properties that the component actually animates. The example assumes
52
+ that only colors change, so `transition-colors` keeps those transitions. If
53
+ opacity or transforms also change, include them, for example with
54
+ `transition-[color,opacity,transform]`. Do not replace `all` with a list that
55
+ leaves out an intended transition.
56
+
57
+ ## Options
58
+
59
+ `rules` lists the restrictions. Each entry has `properties` and `values`
60
+ patterns, and an optional `message` that explains what to use instead. Patterns
61
+ accept `*` and `?` and ignore case. Every matching entry applies.
62
+
63
+ ## Rule settings
64
+
65
+ | Preset | Severity |
66
+ | --- | --- |
67
+ | `recommended` | off |
68
+ | `strict` | off |
69
+ | `stylistic` | off |
70
+
71
+ | Option | Default |
72
+ | --- | --- |
73
+ | `checkImplementation` | `true` |
74
+ | `rules` | `[]` |
75
+
76
+ [Configure lint](../configuration.md#lint) to change the severity or options.
@@ -0,0 +1,73 @@
1
+ ---
2
+ title: "no-restricted-length-units"
3
+ description: "Reports length units that your project forbids for some properties, such as px for width."
4
+ ---
5
+
6
+ # no-restricted-length-units
7
+
8
+ This rule reports a length with a unit that your project forbids for the
9
+ property, such as `px` for `width`. Zero lengths are not reported, because they
10
+ need no unit. The rule is off until you list properties and units.
11
+
12
+ ## Configuration
13
+
14
+ ```json
15
+ {
16
+ "lint": {
17
+ "rules": {
18
+ "no-restricted-length-units": {
19
+ "severity": "warn",
20
+ "rules": [
21
+ {
22
+ "properties": ["width"],
23
+ "disallow": ["px"]
24
+ }
25
+ ]
26
+ }
27
+ }
28
+ }
29
+ }
30
+ ```
31
+
32
+ ## Reported
33
+
34
+ ```tsx
35
+ style("w-[20px]");
36
+ ```
37
+
38
+ > no-restricted-length-units: unit `px` is forbidden for `width`
39
+ >
40
+ > Example:1:8
41
+
42
+ ## Fixed
43
+
44
+ ```tsx
45
+ style("w-5");
46
+ ```
47
+
48
+ ## How to fix
49
+
50
+ Write the same size with an allowed unit. With the default `--spacing` of
51
+ `0.25rem`, `w-5` is `1.25rem`, which is 20px at the default font size, as in the
52
+ example.
53
+
54
+ ## Options
55
+
56
+ `rules` lists entries with `properties` patterns and the units to `disallow`.
57
+ When several entries match a property, the last one applies, so a later, more
58
+ specific entry can make an exception.
59
+
60
+ ## Rule settings
61
+
62
+ | Preset | Severity |
63
+ | --- | --- |
64
+ | `recommended` | off |
65
+ | `strict` | off |
66
+ | `stylistic` | off |
67
+
68
+ | Option | Default |
69
+ | --- | --- |
70
+ | `checkImplementation` | `false` |
71
+ | `rules` | `[]` |
72
+
73
+ [Configure lint](../configuration.md#lint) to change the severity or options.
@@ -0,0 +1,73 @@
1
+ ---
2
+ title: "no-restricted-theme-tokens"
3
+ description: "Reports utilities that use theme tokens that your project reserves, such as the default palette."
4
+ ---
5
+
6
+ # no-restricted-theme-tokens
7
+
8
+ This rule reports a utility that uses a theme token that your project reserves,
9
+ such as the default palette color behind `bg-blue-500`. Use it to make components
10
+ use role names such as `bg-action`. The rule is off until you list tokens.
11
+
12
+ ## Configuration
13
+
14
+ ```json
15
+ {
16
+ "lint": {
17
+ "rules": {
18
+ "no-restricted-theme-tokens": {
19
+ "severity": "warn",
20
+ "tokens": ["--color-blue-*"]
21
+ }
22
+ }
23
+ }
24
+ }
25
+ ```
26
+
27
+ ## Reported
28
+
29
+ ```tsx
30
+ style("bg-blue-500");
31
+ ```
32
+
33
+ > no-restricted-theme-tokens: direct use of theme token `--color-blue-500` is forbidden
34
+ >
35
+ > Example:1:8
36
+
37
+ ## Fixed
38
+
39
+ ```tsx
40
+ style("bg-action");
41
+ ```
42
+
43
+ ## How to fix
44
+
45
+ Use the role token that stands for the color, as in the example. The role token
46
+ can still refer to the palette in its definition:
47
+
48
+ ```css
49
+ @theme {
50
+ --color-action: var(--color-blue-500);
51
+ }
52
+ ```
53
+
54
+ ## Options
55
+
56
+ `tokens` lists patterns for the reserved custom properties, such as
57
+ `--color-blue-*`. Patterns accept `*` and `?`, and they are case-sensitive. The
58
+ list must not be empty when the rule is on.
59
+
60
+ ## Rule settings
61
+
62
+ | Preset | Severity |
63
+ | --- | --- |
64
+ | `recommended` | off |
65
+ | `strict` | off |
66
+ | `stylistic` | off |
67
+
68
+ | Option | Default |
69
+ | --- | --- |
70
+ | `checkImplementation` | `true` |
71
+ | `tokens` | `[]` |
72
+
73
+ [Configure lint](../configuration.md#lint) to change the severity or options.
@@ -0,0 +1,73 @@
1
+ ---
2
+ title: "no-restricted-utilities"
3
+ description: "Reports utilities that your project forbids, by name."
4
+ ---
5
+
6
+ # no-restricted-utilities
7
+
8
+ This rule reports a utility whose name matches a pattern that your project
9
+ forbids. It checks the name as written, not the generated CSS. The rule is off
10
+ until you list utilities.
11
+
12
+ ## Configuration
13
+
14
+ ```json
15
+ {
16
+ "lint": {
17
+ "rules": {
18
+ "no-restricted-utilities": {
19
+ "severity": "warn",
20
+ "utilities": [
21
+ {
22
+ "pattern": "space-*",
23
+ "message": "Use gap on the container."
24
+ }
25
+ ]
26
+ }
27
+ }
28
+ }
29
+ }
30
+ ```
31
+
32
+ ## Reported
33
+
34
+ ```tsx
35
+ style("flex flex-col space-y-4");
36
+ ```
37
+
38
+ > no-restricted-utilities: utility `space-y-4` is forbidden: Use gap on the container.
39
+ >
40
+ > Example:1:22
41
+
42
+ ## Fixed
43
+
44
+ ```tsx
45
+ style("flex flex-col gap-4");
46
+ ```
47
+
48
+ ## How to fix
49
+
50
+ Follow the message of the matching entry. In the example, the project prefers
51
+ `gap` to `space-*`, so the fix keeps the same spacing with `gap-4`.
52
+
53
+ ## Options
54
+
55
+ `utilities` lists entries with a name `pattern` and an optional `message`.
56
+ Patterns accept `*` and `?`, and they are case-sensitive.
57
+
58
+ To also catch other utilities that produce the same CSS, use
59
+ [no-restricted-declarations](no-restricted-declarations.md).
60
+
61
+ ## Rule settings
62
+
63
+ | Preset | Severity |
64
+ | --- | --- |
65
+ | `recommended` | off |
66
+ | `strict` | off |
67
+ | `stylistic` | off |
68
+
69
+ | Option | Default |
70
+ | --- | --- |
71
+ | `utilities` | `[]` |
72
+
73
+ [Configure lint](../configuration.md#lint) to change the severity or options.