stillwind 0.10.1 → 0.12.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 (87) hide show
  1. package/AGENTS_TEMPLATE.md +3 -2
  2. package/CHANGELOG.md +36 -0
  3. package/README.md +2 -2
  4. package/dist/{class-object-BaK8uudd.d.ts → class-object-CXvJOi2z.d.ts} +2 -2
  5. package/dist/class-object-CzD1oMD_.js +6 -0
  6. package/dist/{class-object-DNcjzcfH.js.map → class-object-CzD1oMD_.js.map} +1 -1
  7. package/dist/class-string-CrQnTRvI.js +6 -0
  8. package/dist/{class-string-KnYInbiw.js.map → class-string-CrQnTRvI.js.map} +1 -1
  9. package/dist/{class-string-C5YFtXQn.d.ts → class-string-DQmH4PZX.d.ts} +2 -2
  10. package/dist/frameworks/alpine.d.ts +2 -2
  11. package/dist/frameworks/alpine.js +1 -1
  12. package/dist/frameworks/astro.d.ts +2 -2
  13. package/dist/frameworks/astro.js +1 -1
  14. package/dist/frameworks/lit.d.ts +2 -2
  15. package/dist/frameworks/lit.js +1 -1
  16. package/dist/frameworks/preact.d.ts +2 -2
  17. package/dist/frameworks/preact.js +1 -1
  18. package/dist/frameworks/qwik.d.ts +2 -2
  19. package/dist/frameworks/qwik.js +1 -1
  20. package/dist/frameworks/react.d.ts +1 -1
  21. package/dist/frameworks/react.js +1 -1
  22. package/dist/frameworks/solid.d.ts +2 -2
  23. package/dist/frameworks/solid.js +1 -1
  24. package/dist/frameworks/svelte.d.ts +2 -2
  25. package/dist/frameworks/svelte.js +1 -1
  26. package/dist/frameworks/vanilla.d.ts +2 -2
  27. package/dist/frameworks/vanilla.js +1 -1
  28. package/dist/frameworks/vue.d.ts +2 -2
  29. package/dist/frameworks/vue.js +1 -1
  30. package/dist/{index-DBpgaaD7.d.ts → index-uw1R9t_P.d.ts} +11 -11
  31. package/dist/macro/index.d.ts +1 -1
  32. package/dist/macro/index.js +1 -1
  33. package/dist/style-Bzuux32Y.js +47 -0
  34. package/dist/{style-BE8vuLiO.js.map → style-Bzuux32Y.js.map} +1 -1
  35. package/docs/agents.md +1 -0
  36. package/docs/at-rules/apply.md +1 -1
  37. package/docs/at-rules/custom-variant.md +1 -1
  38. package/docs/at-rules/slot.md +1 -1
  39. package/docs/at-rules/stillwind-property.md +1 -1
  40. package/docs/at-rules/stillwind-registry.md +1 -1
  41. package/docs/at-rules/stillwind-require-properties.md +1 -1
  42. package/docs/at-rules/stillwind-undef-arbitrary-property.md +1 -1
  43. package/docs/at-rules/stillwind-undef-utility.md +1 -1
  44. package/docs/at-rules/stillwind-undef-variant.md +1 -1
  45. package/docs/at-rules/theme.md +5 -5
  46. package/docs/at-rules/utility.md +4 -4
  47. package/docs/at-rules/variant.md +1 -1
  48. package/docs/cli.md +146 -51
  49. package/docs/configuration.md +63 -4
  50. package/docs/errors/SW01001.md +1 -1
  51. package/docs/errors/SW03001.md +1 -1
  52. package/docs/errors/SW10004.md +1 -1
  53. package/docs/errors/SW10005.md +1 -1
  54. package/docs/errors/SW11001.md +1 -1
  55. package/docs/errors/SW12001.md +1 -1
  56. package/docs/errors/SW12002.md +1 -1
  57. package/docs/errors/SW13002.md +1 -1
  58. package/docs/errors/SW14001.md +1 -1
  59. package/docs/errors/SW14002.md +1 -1
  60. package/docs/errors/SW14003.md +1 -1
  61. package/docs/errors/SW14004.md +1 -1
  62. package/docs/errors/SW14007.md +1 -1
  63. package/docs/errors/SW32003.md +1 -1
  64. package/docs/errors/SW32005.md +1 -1
  65. package/docs/formatters.md +34 -2
  66. package/docs/guides/lint-adoption.md +2 -0
  67. package/docs/guides/migrating-from-tailwind.md +8 -0
  68. package/docs/guides/recommended-practices.md +18 -0
  69. package/docs/guides/tailwind-compatibility.md +8 -0
  70. package/docs/index.md +4 -5
  71. package/docs/integrations.md +295 -79
  72. package/docs/lints/index.md +12 -0
  73. package/docs/lints/invalid-cva-input.md +1 -1
  74. package/docs/lints/invalid-rule-group-input.md +1 -1
  75. package/docs/lints/missing-view-transition-name.md +1 -1
  76. package/docs/lints/prefer-direct-styling.md +1 -1
  77. package/docs/lints/suspending-macro-argument.md +1 -1
  78. package/docs/llms.txt +233 -0
  79. package/docs/macros/style.md +10 -0
  80. package/docs/plugins/iconify.md +2 -0
  81. package/docs/utilities-and-variants.md +2 -0
  82. package/package.json +4 -4
  83. package/skills/setup-stillwind/SKILL.md +1 -2
  84. package/skills/stillwind/SKILL.md +18 -11
  85. package/dist/class-object-DNcjzcfH.js +0 -6
  86. package/dist/class-string-KnYInbiw.js +0 -6
  87. package/dist/style-BE8vuLiO.js +0 -44
@@ -26,7 +26,7 @@ style({
26
26
  });
27
27
  ```
28
28
 
29
- > invalid-rule-group-input: style() rule groups cannot contain external class value
29
+ > invalid-rule-group-input: style() rule groups cannot contain external class values
30
30
  >
31
31
  > Example:3:12
32
32
 
@@ -18,7 +18,7 @@ const transition = style.viewTransition({ old: "duration-150" });
18
18
  style(transition);
19
19
  ```
20
20
 
21
- > missing-view-transition-name: a view transition class without a name does not participate; add .for(key) or declare view-transition-name
21
+ > missing-view-transition-name: a view transition class without a name does not participate; add `.for(key)` or declare `view-transition-name`
22
22
  >
23
23
  > Example:2:1
24
24
 
@@ -16,7 +16,7 @@ preset enables this rule.
16
16
  const toolbar = style("flex gap-2 [&_button]:p-4");
17
17
  ```
18
18
 
19
- > prefer-direct-styling: variant selector `& button` styles another element. Attach these styles directly to that element
19
+ > prefer-direct-styling: variant selector `& button` styles another element; attach these styles directly to that element
20
20
  >
21
21
  > Example:1:35
22
22
 
@@ -17,7 +17,7 @@ async function props() {
17
17
  }
18
18
  ```
19
19
 
20
- > suspending-macro-argument: evaluate await, yield, and dynamic imports outside macro arguments, then pass their values
20
+ > suspending-macro-argument: evaluate `await`, `yield`, and dynamic imports outside macro arguments, then pass their values
21
21
  >
22
22
  > Example:2:25
23
23
 
package/docs/llms.txt ADDED
@@ -0,0 +1,233 @@
1
+ # Stillwind documentation
2
+
3
+ Index of the Markdown pages bundled in `docs/`. Paths are relative to this file.
4
+
5
+ ## Pages
6
+
7
+ - [Getting started](index.md): Add Stillwind to a Vite and React application, style a component, and check your styles.
8
+ - [Coding agents](agents.md): Let a coding agent set up Stillwind or migrate a project, using the documentation and skills in the stillwind package.
9
+ - [CLI](cli.md): Commands, options, file selection, exit codes, and output formats of the Stillwind CLI.
10
+ - [Configuration](configuration.md): Set up projects in stillwind.config.ts, choose lint rules, and look up every project field.
11
+ - [Editors](editors.md): Install the Stillwind extension, sort and fix on save, and connect other editors to the language server.
12
+ - [Formatters](formatters.md): Sort utilities together with Prettier, Oxfmt, or another document formatter.
13
+ - [Framework integrations](integrations.md): Import style() for your framework, and add Stillwind to your build tool.
14
+ - [Built-in utilities and variants](utilities-and-variants.md): Look up the CSS of a utility or variant, or find the canonical utility for CSS declarations.
15
+ - [Why Stillwind](why.md): Keep Tailwind-style code consistent as AI agents write more of it.
16
+
17
+ ## at-rules
18
+
19
+ - [At-rule reference](at-rules/index.md): Find the at-rules that define tokens, utilities, and variants in your stylesheet, and read their syntax and output.
20
+ - [@apply](at-rules/apply.md): Insert the declarations of utilities, including their variants, into a rule of your stylesheet.
21
+ - [@custom-variant](at-rules/custom-variant.md): Define a variant with a selector, or with a block that marks the styled content with @slot.
22
+ - [@plugin](at-rules/plugin.md): Load a Stillwind plugin or a Tailwind CSS v4 JavaScript plugin, with optional options.
23
+ - [Registry directives](at-rules/registry-directives.md): Read the at-rules that define Stillwind's built-in utilities, variants, and theme metadata.
24
+ - [@slot](at-rules/slot.md): Mark where a variant definition inserts the styled content.
25
+ - [@stillwind-css-template](at-rules/stillwind-css-template.md): Define where style.css() places its utilities, theme values, and other supporting CSS.
26
+ - [@stillwind-property](at-rules/stillwind-property.md): Register a custom property that the stylesheet declares with @property only when generated CSS needs it.
27
+ - [@stillwind-registry](at-rules/stillwind-registry.md): Define or remove utilities only for style(), keyframes, animation options, or view transitions.
28
+ - [@stillwind-require-properties](at-rules/stillwind-require-properties.md): Make a utility emit the registrations of custom properties that it needs.
29
+ - [@stillwind-slot](at-rules/stillwind-slot.md): Place generated utilities, theme values, keyframes, and property registrations in your stylesheet.
30
+ - [@stillwind-undef-arbitrary-property](at-rules/stillwind-undef-arbitrary-property.md): Reject arbitrary-property utilities such as [color:red] for the properties that match a pattern.
31
+ - [@stillwind-undef-utility](at-rules/stillwind-undef-utility.md): Remove built-in or plugin utility definitions that match a name or a prefix.
32
+ - [@stillwind-undef-variant](at-rules/stillwind-undef-variant.md): Remove built-in or plugin variant definitions that match a name or a prefix.
33
+ - [@theme](at-rules/theme.md): Define design tokens that add utilities, and shared values such as images.
34
+ - [@utility](at-rules/utility.md): Define a utility, or add declarations to a built-in utility with the same name.
35
+ - [@variant](at-rules/variant.md): Apply variants, such as hover or dark, to a block of declarations in a rule or custom utility of your stylesheet.
36
+
37
+ ## concepts
38
+
39
+ - [CSS ordering](concepts/css-ordering.md): See how Stillwind orders CSS from different files, calls, conditions, variants, and utilities, and how the browser decides which value wins.
40
+ - [How styles compile](concepts/how-styles-compile.md): See what Stillwind generates at build time, what JavaScript remains at runtime, and how CSS reaches the page.
41
+ - [Stylesheets](concepts/stylesheets.md): See which CSS files the stillwind package provides, how to import them separately, and which optional files change built-in utilities.
42
+
43
+ ## errors
44
+
45
+ - [Compiler error reference](errors/index.md): Find a compiler error by its code, and see whether to fix the source, fix the configuration, or report a bug.
46
+ - [SW01001: Invalid property prefix](errors/SW01001.md): The prefix, tailwindPrefix, or themePrefix setting does not start with -- and end with -.
47
+ - [SW01002: Invalid hash length](errors/SW01002.md): The hashLength setting is outside the supported range.
48
+ - [SW01003: Invalid lint configuration](errors/SW01003.md): A lint rule has an option value that the compiler cannot use.
49
+ - [SW02001: Framework constraint conflict](errors/SW02001.md): The prepared source selects a framework that differs from the component format.
50
+ - [SW02002: Unresolved root stylesheet](errors/SW02002.md): The stylesheet that the css setting selects cannot be found.
51
+ - [SW03001: Generated identifier collision](errors/SW03001.md): Two different styles would receive the same generated name.
52
+ - [SW03002: Identifier generator failed](errors/SW03002.md): A custom naming function threw an error or returned an invalid name.
53
+ - [SW03003: Theme variable collision](errors/SW03003.md): A theme variable takes the name of a custom property that Stillwind uses internally after themePrefix applies.
54
+ - [SW10001: JavaScript parse error](errors/SW10001.md): The JavaScript or TypeScript of a file has a syntax error.
55
+ - [SW10002: Invalid component syntax](errors/SW10002.md): A Vue, Svelte, or Astro component has a syntax error.
56
+ - [SW10003: Invalid Unicode string](errors/SW10003.md): A string used to generate CSS or resolve a module contains a lone Unicode surrogate.
57
+ - [SW10004: Unconsumed macro use](errors/SW10004.md): A ref method, ref condition, or animation call is stored or passed somewhere other than directly in style().
58
+ - [SW10005: Untransformed macro reference](errors/SW10005.md): The style function is used as a value instead of being called.
59
+ - [SW11001: Style composition cycle](errors/SW11001.md): Two styles use each other as a base.
60
+ - [SW11002: CSS module ordering cycle](errors/SW11002.md): Two modules each build styles on a base from the other module.
61
+ - [SW11003: Unavailable style base](errors/SW11003.md): The compiled CSS of a base style is missing from the build.
62
+ - [SW12001: Incompatible declaration assignment](errors/SW12001.md): A variable that holds one ref or animation is assigned a different one.
63
+ - [SW12002: Declaration identities unavailable](errors/SW12002.md): The compiler cannot tell which refs or animations a value can hold.
64
+ - [SW13001: Authored CSS parse error](errors/SW13001.md): Your stylesheet has a CSS syntax error.
65
+ - [SW13002: Unterminated CSS block](errors/SW13002.md): A CSS block in your stylesheet is not closed.
66
+ - [SW13003: Invalid CSS block](errors/SW13003.md): The compiler cannot read a balanced CSS block.
67
+ - [SW13004: CSS nesting limit exceeded](errors/SW13004.md): CSS rules or functions in your stylesheet are nested too deeply.
68
+ - [SW14001: Missing utilities slot](errors/SW14001.md): Your stylesheet does not place the generated utility CSS anywhere.
69
+ - [SW14002: Missing support slot](errors/SW14002.md): Your stylesheet has no place for CSS that a feature needs, such as keyframes.
70
+ - [SW14003: Malformed property requirement](errors/SW14003.md): An @stillwind-require-properties directive in your stylesheet has invalid syntax.
71
+ - [SW14004: Malformed utility property requirement](errors/SW14004.md): A utility that you use has an @stillwind-require-properties directive with invalid syntax.
72
+ - [SW14005: Required property is unregistered](errors/SW14005.md): A utility requires a custom property that no @stillwind-property registers.
73
+ - [SW14006: Property-usage parse failure](errors/SW14006.md): The compiler cannot parse CSS while collecting custom-property usage.
74
+ - [SW14007: Malformed theme reference](errors/SW14007.md): A --theme() call in your stylesheet has invalid syntax.
75
+ - [SW14008: Circular utility application](errors/SW14008.md): A utility applies itself directly or through another utility.
76
+ - [SW15001: CSS offset exceeds source coordinates](errors/SW15001.md): A stylesheet is too large for the compiler's source positions.
77
+ - [SW15002: Rendered source is too large](errors/SW15002.md): A compiled module is too large for the compiler's source positions.
78
+ - [SW15003: Source size or offset is too large](errors/SW15003.md): A source file or a position in it is too large for the compiler's source positions.
79
+ - [SW30001: TypeScript checker facts required](errors/SW30001.md): The compiler needs type information for a value, but the integration did not provide it.
80
+ - [SW30002: Invalid or stale TypeScript facts](errors/SW30002.md): The type information from the integration does not match the source or the compiler version.
81
+ - [SW30003: Incompatible symbolic fact kinds](errors/SW30003.md): The type information describes a value as the wrong kind, such as a keyframes definition as a ref.
82
+ - [SW30004: Checker expression unavailable](errors/SW30004.md): The integration cannot find the code that TypeScript needs to check for an expression.
83
+ - [SW31001: Invalid projection map](errors/SW31001.md): The mapping between a component and its converted script is malformed.
84
+ - [SW31002: Ambiguous or missing original range](errors/SW31002.md): A Stillwind expression in a converted script maps to no place, or several places, in the component.
85
+ - [SW31003: Projection content mismatch](errors/SW31003.md): The converted script and the component contain different text at a mapped location.
86
+ - [SW31004: Invalid converter output syntax](errors/SW31004.md): The script that a converter generated from a valid component has a syntax error.
87
+ - [SW31005: Component projection preparation failed](errors/SW31005.md): The converter for a Vue, Svelte, or Astro component failed before compilation.
88
+ - [SW31006: Invalid UTF-16 offset](errors/SW31006.md): A requested UTF-16 offset is outside the source or inside a character.
89
+ - [SW31007: Invalid UTF-16 position](errors/SW31007.md): A requested line and column do not exist in the source.
90
+ - [SW31008: Invalid UTF-8 offset](errors/SW31008.md): A requested byte offset is outside the source or inside a multibyte character.
91
+ - [SW31009: Unmapped macro binding read](errors/SW31009.md): A use of style in a converted component has no mapping to the original component.
92
+ - [SW31010: Edit outside an editable projection region](errors/SW31010.md): The compiler must edit a part of a component that the converter marks as not editable.
93
+ - [SW31011: Attribute quote mismatch](errors/SW31011.md): The converter recorded the wrong quote character for an attribute that the compiler edits.
94
+ - [SW32001: CSS imports need host resolution](errors/SW32001.md): A stylesheet with @import was loaded through an API that cannot resolve imports.
95
+ - [SW32002: Invalid initial CSS batch](errors/SW32002.md): The first answer to the stylesheet loader does not contain exactly one stylesheet.
96
+ - [SW32003: Unknown or duplicate CSS request](errors/SW32003.md): An answer to the stylesheet loader names a request that is not pending.
97
+ - [SW32004: Conflicting CSS source](errors/SW32004.md): One stylesheet name received two different contents during one load.
98
+ - [SW32005: CSS loader already completed](errors/SW32005.md): An answer reached the stylesheet loader after it finished loading.
99
+ - [SW32006: CSS request IDs exhausted](errors/SW32006.md): The stylesheet loader ran out of request IDs during one load.
100
+ - [SW32007: CSS source IDs exhausted](errors/SW32007.md): The stylesheet loader ran out of IDs for different stylesheet files.
101
+ - [SW33001: Original map on an internal source](errors/SW33001.md): An internal generated buffer was registered with a map to an original document.
102
+ - [SW33002: Invalid source byte range](errors/SW33002.md): A requested byte range ends before it starts, or is otherwise unusable.
103
+ - [SW33003: Span belongs to another file](errors/SW33003.md): A source range from one file was applied to another file.
104
+ - [SW33004: Invalid source span](errors/SW33004.md): A source range lies outside its file or splits a multibyte character.
105
+ - [SW33005: Invalid source byte offset](errors/SW33005.md): A requested byte offset lies outside its file or splits a multibyte character.
106
+ - [SW34001: Missing macro import anchor](errors/SW34001.md): The compiler cannot find the Stillwind import where it must add runtime imports.
107
+ - [SW34002: Missing module CSS target](errors/SW34002.md): A file imports stillwind/module-css, but the integration provides no module for it.
108
+ - [SW34003: Transform requested after failed compilation](errors/SW34003.md): The integration asked for code edits from a compilation that failed.
109
+ - [SW90001: Invalid generated CSS block](errors/SW90001.md): The compiler generated CSS that is not made of complete rules.
110
+ - [SW90002: Missing retained rule](errors/SW90002.md): The compiler refers to a CSS rule that its own results do not contain.
111
+ - [SW90003: Inconsistent internal CSS graph](errors/SW90003.md): The compiler's record of your stylesheet imports does not match the loaded stylesheets.
112
+ - [SW90004: Inconsistent macro import metadata](errors/SW90004.md): The compiler recorded the Stillwind import at the wrong place.
113
+ - [SW90005: Macro anchor removal edit missing](errors/SW90005.md): The compiler chose a Stillwind import to replace, but did not plan its replacement.
114
+ - [SW90006: Invalid transform expression mapping](errors/SW90006.md): The compiler generated a code edit with an invalid link to the original expression.
115
+ - [SW90007: Overlapping source replacements](errors/SW90007.md): The compiler planned two code edits that overlap.
116
+ - [SW90008: Invalid compiler-produced source coordinates](errors/SW90008.md): The compiler produced a source position that is not valid.
117
+
118
+ ## guides
119
+
120
+ - [Animations](guides/animations.md): Define keyframes in the component that uses them, and respect reduced-motion preferences.
121
+ - [Design systems](guides/design-systems.md): Define colors, spacing, radii, breakpoints, and text sizes once, and report values that bypass them.
122
+ - [Element relationships](guides/element-relationships.md): Style an element from another element's state, size, or position through refs that TypeScript checks.
123
+ - [Checks in the editor and CI](guides/lint-adoption.md): Catch misspelled utilities, conflicts, and project policy violations with the CLI, CI, and the editor.
124
+ - [Migrating from CSS](guides/migrating-from-css.md): Move styles from plain CSS, CSS Modules, preprocessors, or CSS-in-JS into style() calls and theme tokens.
125
+ - [Migrating from Tailwind CSS](guides/migrating-from-tailwind.md): Move a Tailwind CSS v4 project to Stillwind, from the stylesheet and build to components and configuration.
126
+ - [Recommended practices](guides/recommended-practices.md): Keep styles next to their elements, reuse them through components, and avoid the mistakes that produce no CSS.
127
+ - [Responsive styles](guides/responsive-styles.md): Name breakpoints once, and use them in utilities, authored CSS, and JavaScript.
128
+ - [Reusable styles](guides/reusable-styles.md): Share a base style, and express states and options with variants instead of toggled classes.
129
+ - [Runtime conditions](guides/runtime-conditions.md): Change utilities and values with a custom property, without changing the classes of an element.
130
+ - [The basics of style()](guides/style.md): Apply utilities, variants, conditions, overrides, and runtime values to an element.
131
+ - [Tailwind CSS compatibility](guides/tailwind-compatibility.md): Check which Tailwind CSS v4 features, plugins, and CSS packages work in Stillwind, and what Stillwind does differently by design.
132
+ - [View transitions](guides/view-transitions.md): Style view transition snapshots in the component, and give each item a stable name.
133
+ - [Web Components](guides/web-components.md): Add the compiled styles of a component module to its shadow root.
134
+
135
+ ## lints
136
+
137
+ - [Lint rule reference](lints/index.md): Find a lint rule by the kind of mistake or policy that it reports.
138
+ - [ambiguous-style-base-order](lints/ambiguous-style-base-order.md): Reports two independent base styles in one call that set the same property.
139
+ - [bypassed-undefinition](lints/bypassed-undefinition.md): Reports a top-level utility definition that also applies where the built-in definitions remove it.
140
+ - [clamped-value](lints/clamped-value.md): Reports a value outside the range that the browser uses, such as opacity above 1.
141
+ - [conflicting-provider-properties](lints/conflicting-provider-properties.md): Reports a container or anchor property that a ref method and a utility both set.
142
+ - [conflicting-utilities](lints/conflicting-utilities.md): Reports utilities that set the same CSS property under the same conditions, such as p-2 p-4.
143
+ - [document-scoped-selector](lints/document-scoped-selector.md): Reports a selector variant that styles the whole document instead of the element.
144
+ - [duplicate-definition](lints/duplicate-definition.md): Reports a utility or variant definition that replaces an earlier one with the same name.
145
+ - [duplicate-utility](lints/duplicate-utility.md): Reports the same utility written twice under the same conditions.
146
+ - [duplicate-view-transition-name](lints/duplicate-view-transition-name.md): Reports two .for() calls in one style() call.
147
+ - [ignored-definition-condition](lints/ignored-definition-condition.md): Reports a media rule around a utility definition, which the compiler ignores.
148
+ - [ignored-tailwind-feature](lints/ignored-tailwind-feature.md): Reports Tailwind CSS features that Stillwind ignores in the stylesheet, such as @config and @source.
149
+ - [implicit-nesting-selector](lints/implicit-nesting-selector.md): Reports a custom variant selector without &, which matches descendants.
150
+ - [incompatible-property-value](lints/incompatible-property-value.md): Reports a utility value that the browser rejects for its CSS property.
151
+ - [incompatible-theme-value](lints/incompatible-theme-value.md): Reports a theme token with a value of the wrong type for its namespace, such as a length for a color.
152
+ - [ineffective-anchor-scope](lints/ineffective-anchor-scope.md): Reports an empty or repeated ref list in an anchor scope.
153
+ - [interfering-imported-style-base](lints/interfering-imported-style-base.md): Reports an imported base style that sets the same property as another style in the call.
154
+ - [invalid-animation-option](lints/invalid-animation-option.md): Reports a utility in the options of an animation that is not an animation option, such as p-4.
155
+ - [invalid-css-directive](lints/invalid-css-directive.md): Reports a malformed or unsupported Stillwind directive in your stylesheet.
156
+ - [invalid-css-import](lints/invalid-css-import.md): Reports a stylesheet import that cannot be resolved.
157
+ - [invalid-css-input](lints/invalid-css-input.md): Reports a style.css() argument that is not a utility known at build time.
158
+ - [invalid-cva-config](lints/invalid-cva-config.md): Reports an unknown or malformed field in a style.cva() configuration.
159
+ - [invalid-cva-input](lints/invalid-cva-input.md): Reports && or a ternary inside a style.cva() value.
160
+ - [invalid-keyframes-definition](lints/invalid-keyframes-definition.md): Reports a style.keyframes() frame key that is not a keyframe position, such as middle.
161
+ - [invalid-keyframes-use](lints/invalid-keyframes-use.md): Reports an animation applied with an argument that is not a string of options.
162
+ - [invalid-keyframes-variant](lints/invalid-keyframes-variant.md): Reports a state or container variant around a style.keyframes() definition.
163
+ - [invalid-lint-suppression](lints/invalid-lint-suppression.md): Reports a malformed suppression comment or an unknown rule name in one.
164
+ - [invalid-marker-use](lints/invalid-marker-use.md): Reports a marker class such as group with a variant or the important modifier.
165
+ - [invalid-media-query](lints/invalid-media-query.md): Reports a condition in style.media() that is not a media query, such as hover.
166
+ - [invalid-ref-input](lints/invalid-ref-input.md): Reports a style.ref() label or ref method argument that is not a literal.
167
+ - [invalid-rule-group-input](lints/invalid-rule-group-input.md): Reports a class field, custom property, or ref inside an object with variant keys.
168
+ - [invalid-runtime-condition](lints/invalid-runtime-condition.md): Reports a runtime CSS condition that the compiler cannot compile in its position.
169
+ - [invalid-stored-variant](lints/invalid-stored-variant.md): Reports a style.when() argument that is not a sequence of variants, or a use that can refer to several stored variants.
170
+ - [invalid-style-composition](lints/invalid-style-composition.md): Reports inline styles or custom properties in a base style, which do not carry over.
171
+ - [invalid-style-input](lints/invalid-style-input.md): Reports a style() argument that the compiler cannot compile, such as a number.
172
+ - [invalid-theme-reference](lints/invalid-theme-reference.md): Reports a --theme() reference to a token that is not defined.
173
+ - [invalid-utility](lints/invalid-utility.md): Reports a known utility written in a form that it does not accept.
174
+ - [invalid-variant](lints/invalid-variant.md): Reports a known variant with a value that it does not accept, such as min-[foo].
175
+ - [invalid-view-transition-definition](lints/invalid-view-transition-definition.md): Reports an unknown field in a style.viewTransition() definition.
176
+ - [invalid-view-transition-use](lints/invalid-view-transition-use.md): Reports extra or invalid arguments to .for() of a view transition.
177
+ - [invalid-view-transition-variant](lints/invalid-view-transition-variant.md): Reports a state or container variant in a style.viewTransition() definition.
178
+ - [mismatched-framework-import](lints/mismatched-framework-import.md): Reports an import of style() from the entrypoint of another framework.
179
+ - [missing-document-target](lints/missing-document-target.md): Reports a style.css() utility without a selector to apply to.
180
+ - [missing-ref-attachment](lints/missing-ref-attachment.md): Reports asContainer() or asAnchor() in a call that does not attach the ref.
181
+ - [missing-view-transition-name](lints/missing-view-transition-name.md): Reports a view transition applied without .for().
182
+ - [mutating-macro-argument](lints/mutating-macro-argument.md): Reports a state update inside an argument of style() or another macro.
183
+ - [no-arbitrary-breakpoints](lints/no-arbitrary-breakpoints.md): Reports viewport widths written as arbitrary values, such as min-[713px]:.
184
+ - [no-arbitrary-colors](lints/no-arbitrary-colors.md): Reports colors written as arbitrary values, such as bg-[#123456].
185
+ - [no-arbitrary-spacing](lints/no-arbitrary-spacing.md): Reports margin, padding, and gap written as arbitrary values, such as p-[13px].
186
+ - [no-class-property](lints/no-class-property.md): Reports the class field, which adds classes without generated CSS.
187
+ - [no-important](lints/no-important.md): Reports utilities with the important modifier, such as p-4!.
188
+ - [no-restricted-declarations](lints/no-restricted-declarations.md): Reports utilities that produce CSS declarations that your project forbids.
189
+ - [no-restricted-length-units](lints/no-restricted-length-units.md): Reports length units that your project forbids for some properties, such as px for width.
190
+ - [no-restricted-theme-tokens](lints/no-restricted-theme-tokens.md): Reports utilities that use theme tokens that your project reserves, such as the default palette.
191
+ - [no-restricted-utilities](lints/no-restricted-utilities.md): Reports utilities that your project forbids, by name.
192
+ - [prefer-canonical-utilities](lints/prefer-canonical-utilities.md): Suggests standard utility spellings and combines equivalent utilities.
193
+ - [prefer-direct-styling](lints/prefer-direct-styling.md): Reports a selector variant that styles another element, such as [&_button]:.
194
+ - [prefer-logical-properties](lints/prefer-logical-properties.md): Reports a physical property that has a logical form, such as ml-4 for ms-4.
195
+ - [prefer-sorted-utilities](lints/prefer-sorted-utilities.md): Reports utilities that are not in sorted order.
196
+ - [prefer-typed-relationships](lints/prefer-typed-relationships.md): Reports group-* and peer-* variants that a ref can replace.
197
+ - [prefer-typed-variables](lints/prefer-typed-variables.md): Reports a custom property without a type in a utility that accepts several types.
198
+ - [prefer-variant-directive](lints/prefer-variant-directive.md): Reports a condition in your stylesheet that a named variant can replace.
199
+ - [redundant-variant](lints/redundant-variant.md): Reports a variant that adds no condition, such as hover:hover:.
200
+ - [repeated-nesting-selector](lints/repeated-nesting-selector.md): Reports a selector that repeats & to relate two elements, such as [&+&].
201
+ - [runtime-condition-requires-css-if](lints/runtime-condition-requires-css-if.md): Reports a runtime CSS condition that needs the useCssIf setting.
202
+ - [split-view-transition-class](lints/split-view-transition-class.md): Reports view transitions split across separate style() calls.
203
+ - [suspending-macro-argument](lints/suspending-macro-argument.md): Reports await, yield, or import() inside an argument of style() or another macro.
204
+ - [unknown-utility](lints/unknown-utility.md): Reports a utility or theme value that your stylesheet does not define.
205
+ - [unknown-variant](lints/unknown-variant.md): Reports a variant that your stylesheet does not define.
206
+ - [unmatched-host-selector](lints/unmatched-host-selector.md): Reports a variant that tests a shadow host through the elements around it.
207
+ - [unsatisfiable-variants](lints/unsatisfiable-variants.md): Reports variants that can never match together, such as portrait:landscape:.
208
+ - [unused-lint-suppression](lints/unused-lint-suppression.md): Reports a suppression comment that suppresses no finding.
209
+ - [unverified-style-base](lints/unverified-style-base.md): Reports a base style whose source the CLI cannot find from its type.
210
+
211
+ ## macros
212
+
213
+ - [Macro reference](macros/index.md): Find the Stillwind API for a task, and read its accepted inputs and generated code.
214
+ - [style.ref() and ref methods](macros/ref/index.md): Name an element with a ref, and style other elements from its state, size, or anchor position.
215
+ - [style.anchorScope()](macros/anchor-scope.md): Limit where an anchor name is visible, so that each component instance uses its own anchor.
216
+ - [style.css()](macros/css.md): Compile utilities into a CSS string that you place yourself, such as in a shadow root.
217
+ - [style.cva()](macros/cva.md): Create a factory that selects compiled styles by option, with the configuration of class-variance-authority.
218
+ - [style.keyframes()](macros/keyframes.md): Define keyframes in a component, and apply them with animation options in style().
219
+ - [style.media()](macros/media.md): Turn named breakpoints and other media variants into a media query string for JavaScript.
220
+ - [ref.asAnchor()](macros/ref/as-anchor.md): Make the element that has a ref a named anchor for CSS anchor positioning.
221
+ - [ref.asContainer()](macros/ref/as-container.md): Make the element that has a ref a named container for ref.at() queries.
222
+ - [ref.at()](macros/ref/at.md): Style an element with a container query on the element that has a ref.
223
+ - [ref() conditions](macros/ref/condition.md): Style an element while an ancestor with a ref exists or matches variants such as hover.
224
+ - [ref().in()](macros/ref/in.md): Style an element from the state of a sibling, inside an ancestor that has another ref.
225
+ - [ref.positionAnchor()](macros/ref/position-anchor.md): Position the styled element against the anchor that a ref names.
226
+ - [style()](macros/style.md): Compile utilities, conditions, custom properties, and base styles into props for an element.
227
+ - [style.viewTransition()](macros/view-transition.md): Define view transition snapshot styles, and give each element a transition name with .for().
228
+ - [style.when()](macros/when.md): Store a variant sequence or alternatives, such as a ref condition, and use them in several style() calls.
229
+
230
+ ## plugins
231
+
232
+ - [Official plugins](plugins/index.md): Add utilities to your stylesheet with the plugins that the Stillwind project maintains.
233
+ - [Iconify icons](plugins/iconify.md): Use Iconify icons as utilities, and include only the icons that you use in your CSS.
@@ -9,6 +9,16 @@ description: "Compile utilities, conditions, custom properties, and base styles
9
9
  for its utilities at build time. React receives `className` and `style`; the
10
10
  other frameworks receive `class` and `style`. Spread the result onto the element.
11
11
 
12
+ ## Contents
13
+
14
+ - [Inputs](#inputs)
15
+ - [Static input](#static-input)
16
+ - [Conditions and custom properties](#conditions-and-custom-properties)
17
+ - [Base styles](#base-styles)
18
+ - [Argument order](#argument-order)
19
+ - [How props combine at runtime](#how-props-combine-at-runtime)
20
+ - [Side effects in arguments](#side-effects-in-arguments)
21
+
12
22
  ## Inputs
13
23
 
14
24
  | Input | Example | Effect |
@@ -5,6 +5,8 @@ description: "Use Iconify icons as utilities, and include only the icons that yo
5
5
 
6
6
  # Iconify icons
7
7
 
8
+ > Command examples use `vp` (Vite+); substitute your project's package manager (such as `pnpm`, `npm`, or `bun`).
9
+
8
10
  `@stillwind/plugin-iconify` adds Iconify icons as Stillwind utilities. Only the
9
11
  icons that you use reach your CSS.
10
12
 
@@ -5,6 +5,8 @@ description: "Look up the CSS of a utility or variant, or find the canonical uti
5
5
 
6
6
  # Built-in utilities and variants
7
7
 
8
+ > Command examples use `vp` (Vite+); substitute your project's package manager (such as `pnpm`, `npm`, or `bun`).
9
+
8
10
  Type a utility to see its CSS, or type CSS declarations to find the utility that
9
11
  produces them. Arbitrary values, such as `p-[16px]`, resolve to their canonical
10
12
  spelling. Arbitrary variants resolve too, so `[&:focus]` finds `focus:`. Part of
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stillwind",
3
- "version": "0.10.1",
3
+ "version": "0.12.0",
4
4
  "description": "Write Tailwind CSS v4 utilities in components, enforce your design system, and ship static CSS",
5
5
  "keywords": [
6
6
  "alpinejs",
@@ -132,9 +132,9 @@
132
132
  "./package.json": "./package.json"
133
133
  },
134
134
  "dependencies": {
135
- "@stillwind/config": "0.10.1",
136
- "@stillwind/native": "0.10.1",
137
- "@stillwind/projection": "0.10.1"
135
+ "@stillwind/config": "0.12.0",
136
+ "@stillwind/native": "0.12.0",
137
+ "@stillwind/projection": "0.12.0"
138
138
  },
139
139
  "devDependencies": {
140
140
  "@stillwind-internal/tools-workspace": "0.0.0",
@@ -28,8 +28,7 @@ If the project already styles its pages with Tailwind CSS or other CSS, follow
28
28
  extensions of the frameworks that the project uses.
29
29
  5. Register the integration as the integration page describes. Keep the plugin
30
30
  order that it requires, such as Stillwind before the JSX transform.
31
- 6. Add `stillwind lint` and `stillwind fmt --check` to the project's check
32
- scripts or CI when the project has them.
31
+ 6. Add `stillwind check` to the project's check scripts or CI when the project has them.
33
32
  7. A starter template often includes demo styles, such as `App.css`. Ask the
34
33
  user whether to rewrite the demo components with `style()` or to remove the
35
34
  demo.
@@ -7,7 +7,8 @@ description: Write and fix styles in a project that uses Stillwind, by loading t
7
7
 
8
8
  Read only the pages that the task needs. Use the documentation of the installed package
9
9
  in `node_modules/stillwind/docs/`, so that it matches the project's
10
- Stillwind version. The `docs/` paths below are relative to the package root.
10
+ Stillwind version. The `docs/` paths below are relative to the package root, and
11
+ `docs/llms.txt` lists every bundled page.
11
12
  When this skill is installed without a local package, follow the skill's link to
12
13
  its real directory and use `../../docs/` in the same package. If the skill was copied
13
14
  without the package, start from https://stillwind.dev/docs/llms.txt, which lists the
@@ -18,7 +19,7 @@ Markdown version of each page.
18
19
  | Task | Pages |
19
20
  | ------------------------------------------------------ | ------------------------------------------------------------------- |
20
21
  | Set up a project, choose an integration | `docs/index.md`, `docs/integrations.md` |
21
- | Migrate existing styles | `../migrate-to-stillwind/SKILL.md` |
22
+ | Migrate existing styles | `node_modules/stillwind/skills/migrate-to-stillwind/SKILL.md` |
22
23
  | Recommended practices and mistakes that produce no CSS | `docs/guides/recommended-practices.md` |
23
24
  | Utilities, variants, conditions, runtime values | `docs/guides/style.md`, `docs/macros/style.md` |
24
25
  | Shared styles, states, and component options | `docs/guides/reusable-styles.md`, `docs/macros/cva.md` |
@@ -48,8 +49,9 @@ Markdown version of each page.
48
49
  to read the tokens of the project. When a value is missing, ask the user before you
49
50
  add a token.
50
51
  - Run `stillwind utilities <name>` to check a utility before you use it, such as
51
- `stillwind utilities p-4 hover:bg-accent`. A `*` pattern searches names, but it omits
52
- numeric and arbitrary values. `stillwind variants` works in the same way.
52
+ `stillwind utilities p-4 hover:bg-accent`. A `*` pattern searches names and shows
53
+ functional shapes such as `p-<number>` and `p-[<length-percentage>]`; add `--names-only`
54
+ to list names without CSS previews. `stillwind variants` works in the same way.
53
55
  - When you know the CSS but not the utility, pass the declaration as an arbitrary property,
54
56
  such as `stillwind utilities '[padding:16px]' '[&:focus]:[display:flex]'`, and use the
55
57
  canonical spelling that the output names. An arbitrary property in the source is only an
@@ -57,17 +59,22 @@ Markdown version of each page.
57
59
  exists, the declaration has no equivalent utility.
58
60
  - Write custom utilities with `@apply` and variants, not with hand-written selectors or
59
61
  media queries.
60
- - After you change styles, run `stillwind lint --fix` and `stillwind fmt` through the
61
- project's package manager, such as `vp exec stillwind lint`. Add `--format json` when
62
- you parse the output.
62
+ - After you change styles, run `stillwind check --fix` through the project's package
63
+ manager, such as `vp exec stillwind check --fix`. Add `--format json` when you parse
64
+ the output.
63
65
  - Run `stillwind inspect <file>:<line> --format json` to check the CSS that a
64
66
  `style()` call generates. Paths, globs, and several targets also work.
65
67
  - Read the page of each remaining finding before you fix it. With `--format json`,
66
68
  the `docs` field of a finding names that page. Do not add a suppression comment or
67
69
  relax the `lint` setting unless the user agrees. A suppression comment names the rule
68
70
  and gives the reason after `--`.
69
- - When `conflicting-utilities` reports a pair of classes from a plugin or CSS package,
70
- follow "Conflicts with plugin classes" in `../migrate-to-stillwind/SKILL.md`. For a
71
- pair that the plugin intends, you can change the rule options without asking first,
72
- and you report the change.
71
+ - When `conflicting-utilities` reports a pair of classes from a plugin or CSS package
72
+ (or a plugin class and a core utility), check the installed plugin's documentation or
73
+ examples. If the plugin intends both classes on the same element (such as `btn` with
74
+ `btn-outline`, or `form-input` with `px-4`), update the `conflicting-utilities` options
75
+ in `stillwind.config.ts` without asking first and report the change: set
76
+ `allowShorthandOverrides: true` when the finding's note names it, or add the base class
77
+ to `ignoredUtilities`. See "Plugins" in `docs/lints/conflicting-utilities.md` for
78
+ examples. If the classes are alternatives or belong on different elements, fix the code;
79
+ if the plugin's usage is unclear, ask the user.
73
80
  - Check the result in the browser when a change can affect the layout.
@@ -1,6 +0,0 @@
1
- import { createStyleMacro } from "./style-BE8vuLiO.js";
2
- // src/outputs/class-object.ts
3
- const style = createStyleMacro();
4
- export { style };
5
-
6
- //# sourceMappingURL=class-object-DNcjzcfH.js.map
@@ -1,6 +0,0 @@
1
- import { createStyleMacro } from "./style-BE8vuLiO.js";
2
- // src/outputs/class-string.ts
3
- const style = createStyleMacro();
4
- export { style };
5
-
6
- //# sourceMappingURL=class-string-KnYInbiw.js.map
@@ -1,44 +0,0 @@
1
- // src/macro/style.ts
2
- /**
3
- * Internal use only. Builds the placeholder exported by each framework entrypoint.
4
- * The compiler replaces supported macro calls before the application runs.
5
- *
6
- * @returns A fresh callable object with declaration and scope methods. Calling the
7
- * object or any of these methods throws an Error about missing integration. Creating
8
- * the placeholder itself does not execute any macro or generate CSS.
9
- *
10
- * @internal
11
- */
12
- function createStyleMacro() {
13
- return Object.assign(() => {
14
- throw new Error("Stillwind style() is a compile-time macro. Configure the Stillwind integration for your build tool.");
15
- }, {
16
- anchorScope() {
17
- throw new Error("Stillwind style.anchorScope() is a compile-time macro.");
18
- },
19
- ref() {
20
- throw new Error("Stillwind style.ref() is a compile-time macro.");
21
- },
22
- keyframes() {
23
- throw new Error("Stillwind style.keyframes() is a compile-time macro.");
24
- },
25
- viewTransition() {
26
- throw new Error("Stillwind style.viewTransition() is a compile-time macro.");
27
- },
28
- when() {
29
- throw new Error("Stillwind style.when() is a compile-time macro.");
30
- },
31
- cva() {
32
- throw new Error("Stillwind style.cva() is a compile-time macro.");
33
- },
34
- media() {
35
- throw new Error("Stillwind style.media() is a compile-time macro.");
36
- },
37
- css() {
38
- throw new Error("Stillwind style.css() is a compile-time macro.");
39
- }
40
- });
41
- }
42
- export { createStyleMacro };
43
-
44
- //# sourceMappingURL=style-BE8vuLiO.js.map