stillwind 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +212 -0
- package/css/builtin-variants/tw-relationship.css +4 -4
- package/css/builtins.css +1 -1
- package/dist/frameworks/alpine.d.ts +1 -1
- package/dist/frameworks/astro.d.ts +1 -1
- package/dist/frameworks/lit.d.ts +1 -1
- package/dist/frameworks/preact.d.ts +1 -1
- package/dist/frameworks/qwik.d.ts +1 -1
- package/dist/frameworks/solid.d.ts +1 -1
- package/dist/frameworks/svelte.d.ts +1 -1
- package/dist/frameworks/vanilla.d.ts +1 -1
- package/dist/frameworks/vue.d.ts +1 -1
- package/docs/at-rules/apply.md +5 -5
- package/docs/at-rules/custom-variant.md +12 -12
- package/docs/at-rules/index.md +19 -19
- package/docs/at-rules/plugin.md +13 -7
- package/docs/at-rules/registry-directives.md +9 -9
- package/docs/at-rules/slot.md +6 -6
- package/docs/at-rules/stillwind-css-template.md +7 -7
- package/docs/at-rules/stillwind-property.md +10 -10
- package/docs/at-rules/stillwind-registry.md +18 -18
- package/docs/at-rules/stillwind-require-properties.md +9 -9
- package/docs/at-rules/stillwind-slot.md +6 -6
- package/docs/at-rules/stillwind-undef-arbitrary-property.md +9 -9
- package/docs/at-rules/stillwind-undef-utility.md +10 -10
- package/docs/at-rules/stillwind-undef-variant.md +6 -6
- package/docs/at-rules/theme.md +23 -23
- package/docs/at-rules/utility.md +30 -30
- package/docs/at-rules/variant.md +6 -6
- package/docs/cli.md +7 -7
- package/docs/concepts/css-ordering.md +17 -17
- package/docs/concepts/how-styles-compile.md +14 -14
- package/docs/concepts/stylesheets.md +4 -4
- package/docs/configuration.md +29 -29
- package/docs/editors.md +8 -8
- package/docs/errors/SW01003.md +1 -1
- package/docs/errors/SW10001.md +1 -1
- package/docs/errors/SW10002.md +1 -1
- package/docs/errors/SW10004.md +6 -6
- package/docs/errors/SW10005.md +1 -1
- package/docs/errors/SW11001.md +1 -1
- package/docs/errors/SW11003.md +1 -1
- package/docs/errors/SW12001.md +2 -2
- package/docs/errors/SW12002.md +1 -1
- package/docs/errors/SW13001.md +1 -1
- package/docs/errors/SW13003.md +2 -2
- package/docs/errors/SW14001.md +1 -1
- package/docs/errors/SW14003.md +4 -4
- package/docs/errors/SW14004.md +2 -2
- package/docs/errors/SW14005.md +1 -1
- package/docs/errors/SW14006.md +1 -1
- package/docs/errors/SW14007.md +2 -2
- package/docs/errors/SW14008.md +1 -1
- package/docs/errors/SW30001.md +1 -1
- package/docs/errors/SW31001.md +1 -1
- package/docs/errors/SW31004.md +1 -1
- package/docs/errors/SW33005.md +1 -1
- package/docs/errors/SW34002.md +1 -1
- package/docs/errors/SW90001.md +1 -1
- package/docs/errors/SW90005.md +1 -1
- package/docs/errors/SW90006.md +1 -1
- package/docs/errors/index.md +72 -72
- package/docs/formatters.md +5 -5
- package/docs/guides/animations.md +7 -8
- package/docs/guides/design-systems.md +7 -7
- package/docs/guides/element-relationships.md +15 -19
- package/docs/guides/lint-adoption.md +5 -5
- package/docs/guides/migrating-from-css.md +11 -11
- package/docs/guides/migrating-from-tailwind.md +21 -16
- package/docs/guides/recommended-practices.md +18 -18
- package/docs/guides/responsive-styles.md +7 -7
- package/docs/guides/reusable-styles.md +5 -5
- package/docs/guides/runtime-conditions.md +6 -6
- package/docs/guides/style.md +15 -15
- package/docs/guides/tailwind-compatibility.md +27 -21
- package/docs/guides/view-transitions.md +9 -11
- package/docs/guides/web-components.md +4 -4
- package/docs/index.md +14 -12
- package/docs/integrations.md +3 -3
- package/docs/lints/ambiguous-style-base-order.md +2 -2
- package/docs/lints/bypassed-undefinition.md +3 -3
- package/docs/lints/clamped-value.md +1 -1
- package/docs/lints/conflicting-provider-properties.md +2 -2
- package/docs/lints/conflicting-utilities.md +67 -2
- package/docs/lints/document-scoped-selector.md +1 -1
- package/docs/lints/duplicate-definition.md +3 -3
- package/docs/lints/duplicate-utility.md +2 -2
- package/docs/lints/duplicate-view-transition-name.md +3 -3
- package/docs/lints/ignored-definition-condition.md +2 -2
- package/docs/lints/ignored-tailwind-feature.md +3 -3
- package/docs/lints/implicit-nesting-selector.md +2 -2
- package/docs/lints/incompatible-property-value.md +3 -3
- package/docs/lints/incompatible-theme-value.md +1 -1
- package/docs/lints/index.md +74 -74
- package/docs/lints/ineffective-anchor-scope.md +2 -2
- package/docs/lints/interfering-imported-style-base.md +1 -1
- package/docs/lints/invalid-animation-option.md +3 -3
- package/docs/lints/invalid-css-directive.md +3 -3
- package/docs/lints/invalid-css-import.md +2 -2
- package/docs/lints/invalid-css-input.md +4 -4
- package/docs/lints/invalid-cva-config.md +2 -2
- package/docs/lints/invalid-cva-input.md +4 -4
- package/docs/lints/invalid-keyframes-definition.md +2 -2
- package/docs/lints/invalid-keyframes-use.md +2 -2
- package/docs/lints/invalid-keyframes-variant.md +4 -4
- package/docs/lints/invalid-lint-suppression.md +3 -3
- package/docs/lints/invalid-marker-use.md +2 -2
- package/docs/lints/invalid-media-query.md +4 -4
- package/docs/lints/invalid-ref-input.md +4 -4
- package/docs/lints/invalid-rule-group-input.md +2 -2
- package/docs/lints/invalid-runtime-condition.md +3 -3
- package/docs/lints/invalid-stored-variant.md +3 -3
- package/docs/lints/invalid-style-composition.md +2 -2
- package/docs/lints/invalid-style-input.md +2 -2
- package/docs/lints/invalid-theme-reference.md +3 -3
- package/docs/lints/invalid-utility.md +3 -3
- package/docs/lints/invalid-variant.md +2 -2
- package/docs/lints/invalid-view-transition-definition.md +2 -2
- package/docs/lints/invalid-view-transition-use.md +2 -2
- package/docs/lints/invalid-view-transition-variant.md +3 -3
- package/docs/lints/mismatched-framework-import.md +3 -3
- package/docs/lints/missing-document-target.md +2 -2
- package/docs/lints/missing-ref-attachment.md +4 -4
- package/docs/lints/missing-view-transition-name.md +3 -3
- package/docs/lints/mutating-macro-argument.md +2 -2
- package/docs/lints/no-arbitrary-breakpoints.md +2 -2
- package/docs/lints/no-arbitrary-colors.md +2 -2
- package/docs/lints/no-arbitrary-spacing.md +1 -1
- package/docs/lints/no-class-property.md +3 -3
- package/docs/lints/no-important.md +2 -2
- package/docs/lints/no-restricted-declarations.md +1 -1
- package/docs/lints/no-restricted-length-units.md +1 -1
- package/docs/lints/no-restricted-theme-tokens.md +1 -1
- package/docs/lints/no-restricted-utilities.md +2 -2
- package/docs/lints/prefer-canonical-utilities.md +2 -2
- package/docs/lints/prefer-direct-styling.md +3 -3
- package/docs/lints/prefer-logical-properties.md +22 -5
- package/docs/lints/prefer-sorted-utilities.md +2 -2
- package/docs/lints/prefer-typed-relationships.md +3 -3
- package/docs/lints/prefer-typed-variables.md +1 -1
- package/docs/lints/prefer-variant-directive.md +3 -3
- package/docs/lints/redundant-variant.md +2 -2
- package/docs/lints/repeated-nesting-selector.md +2 -2
- package/docs/lints/runtime-condition-requires-css-if.md +3 -3
- package/docs/lints/split-view-transition-class.md +3 -3
- package/docs/lints/suspending-macro-argument.md +2 -2
- package/docs/lints/unknown-utility.md +4 -4
- package/docs/lints/unknown-variant.md +2 -2
- package/docs/lints/unmatched-host-selector.md +2 -2
- package/docs/lints/unsatisfiable-variants.md +1 -1
- package/docs/lints/unused-lint-suppression.md +1 -1
- package/docs/lints/unverified-style-base.md +2 -2
- package/docs/macros/anchor-scope.md +13 -13
- package/docs/macros/css.md +7 -7
- package/docs/macros/cva.md +13 -13
- package/docs/macros/index.md +10 -10
- package/docs/macros/keyframes.md +9 -9
- package/docs/macros/media.md +2 -2
- package/docs/macros/ref/as-anchor.md +11 -11
- package/docs/macros/ref/as-container.md +8 -8
- package/docs/macros/ref/at.md +10 -10
- package/docs/macros/ref/condition.md +8 -8
- package/docs/macros/ref/in.md +11 -11
- package/docs/macros/ref/index.md +16 -16
- package/docs/macros/ref/position-anchor.md +9 -9
- package/docs/macros/style.md +24 -24
- package/docs/macros/view-transition.md +16 -16
- package/docs/macros/when.md +13 -13
- package/docs/plugins/iconify.md +5 -5
- package/docs/plugins/index.md +4 -4
- package/docs/utilities-and-variants.md +6 -6
- package/docs/why.md +13 -15
- package/package.json +8 -6
- package/skills/migrate-to-stillwind/SKILL.md +36 -2
- package/skills/stillwind/SKILL.md +4 -0
package/docs/configuration.md
CHANGED
|
@@ -78,10 +78,10 @@ settings. Stillwind calls it once and uses the result.
|
|
|
78
78
|
|
|
79
79
|
### Required
|
|
80
80
|
|
|
81
|
-
| Field | Value
|
|
82
|
-
| ------- |
|
|
83
|
-
| `css` | Path to the stylesheet that defines the theme, utilities, and variants
|
|
84
|
-
| `files` | Globs for the files that the CLI and the editor check
|
|
81
|
+
| Field | Value |
|
|
82
|
+
| ------- | -------------------------------------------------------------------------------------------- |
|
|
83
|
+
| `css` | Path to the stylesheet that defines the theme, utilities, and variants |
|
|
84
|
+
| `files` | Globs for the files that the CLI and the editor check, and that Vite builds type-check first |
|
|
85
85
|
|
|
86
86
|
### Scope
|
|
87
87
|
|
|
@@ -108,10 +108,10 @@ Paths in `css`, `files`, `exclude`, and `tsconfig` are relative to `root`.
|
|
|
108
108
|
| `target` | Minimum browser versions, such as `["chrome111", "safari17"]`; removes fallbacks they do not need |
|
|
109
109
|
| `utilityOrder` | `"authored"` orders utilities as your stylesheet defines them; `"tailwind"` orders them as Tailwind does |
|
|
110
110
|
| `important` | `true` makes every utility `!important`; a selector nests utilities under that selector |
|
|
111
|
-
| `tailwind` | A Tailwind configuration object; see [Migrating from Tailwind CSS](guides/migrating-from-tailwind
|
|
112
|
-
| `plugins` | Plugin objects for the [`@plugin`](at-rules/plugin
|
|
111
|
+
| `tailwind` | A Tailwind configuration object; see [Migrating from Tailwind CSS](https://stillwind.dev/docs/guides/migrating-from-tailwind#move-configuration) |
|
|
112
|
+
| `plugins` | Plugin objects for the [`@plugin`](https://stillwind.dev/docs/at-rules/plugin) rules of your stylesheet |
|
|
113
113
|
| `rootFontSize` | Pixels per `rem`, used by lint fixes and editor previews; defaults to 16 |
|
|
114
|
-
| `useCssIf` | `true` lets [runtime conditions](guides/runtime-conditions
|
|
114
|
+
| `useCssIf` | `true` lets [runtime conditions](https://stillwind.dev/docs/guides/runtime-conditions) use the native CSS `if()` function; defaults to `false` |
|
|
115
115
|
|
|
116
116
|
### Generated names
|
|
117
117
|
|
|
@@ -129,7 +129,7 @@ Paths in `css`, `files`, `exclude`, and `tsconfig` are relative to `root`.
|
|
|
129
129
|
|
|
130
130
|
| Field | Value |
|
|
131
131
|
| --------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
132
|
-
| `preview` | Which comments [CSS previews](editors
|
|
132
|
+
| `preview` | Which comments [CSS previews](https://stillwind.dev/docs/editors#settings) show: `themeValues`, `pixelEquivalents`, and `colorEquivalents` |
|
|
133
133
|
|
|
134
134
|
The [shared configuration API](https://github.com/SegaraRai/stillwind/blob/main/packages/config/src/compiler.ts)
|
|
135
135
|
describes the remaining fields for custom integrations, such as `sources`,
|
|
@@ -138,7 +138,7 @@ describes the remaining fields for custom integrations, such as `sources`,
|
|
|
138
138
|
## Lint
|
|
139
139
|
|
|
140
140
|
The `lint` field of a project selects the rules that the CLI and the editor
|
|
141
|
-
report. [Checks in the editor and CI](guides/lint-adoption
|
|
141
|
+
report. [Checks in the editor and CI](https://stillwind.dev/docs/guides/lint-adoption) explains
|
|
142
142
|
where the rules run.
|
|
143
143
|
|
|
144
144
|
### Presets and severities
|
|
@@ -169,7 +169,7 @@ export default defineConfig({
|
|
|
169
169
|
| `strict` | Every `recommended` rule as an error, and unused suppression comments |
|
|
170
170
|
| `stylistic` | Preferred spellings, utility sorting, and conflict checks in every writing mode; combine it with `recommended` |
|
|
171
171
|
|
|
172
|
-
The [lint rule reference](lints
|
|
172
|
+
The [lint rule reference](https://stillwind.dev/docs/lints) shows the severity of each rule in
|
|
173
173
|
`recommended`. Each rule page shows its severity in every preset.
|
|
174
174
|
|
|
175
175
|
Each rule has one of three severities:
|
|
@@ -194,7 +194,7 @@ arrays replace earlier arrays. A severity alone, such as `"deny"`, keeps the
|
|
|
194
194
|
rule's options from the presets.
|
|
195
195
|
|
|
196
196
|
An unknown rule name is a configuration error. Turning off rules does not turn
|
|
197
|
-
off [compiler errors](errors
|
|
197
|
+
off [compiler errors](https://stillwind.dev/docs/errors).
|
|
198
198
|
|
|
199
199
|
### Rule options
|
|
200
200
|
|
|
@@ -222,24 +222,24 @@ const rules = {
|
|
|
222
222
|
};
|
|
223
223
|
```
|
|
224
224
|
|
|
225
|
-
| Rule | Options
|
|
226
|
-
| ---------------------------- |
|
|
227
|
-
| `conflicting-utilities` | `allowShorthandOverrides`: allows the supported overrides between shorthand and longhand utilities; defaults to `false`. `writingModes`: writing modes in which physical and logical utilities are compared; defaults to `["horizontal-tb"]` |
|
|
228
|
-
| `invalid-marker-use` | `ignoredClasses`: marker class names that the rule ignores
|
|
229
|
-
| `no-arbitrary-spacing` | `properties`: properties to check in addition to margin, padding, and gap
|
|
230
|
-
| `no-restricted-utilities` | `utilities`: utility patterns, each with an optional message
|
|
231
|
-
| `no-restricted-declarations` | `rules`: patterns for properties and values; every matching entry applies
|
|
232
|
-
| `no-restricted-length-units` | `rules`: property patterns and the units to `disallow`; the last matching entry applies
|
|
233
|
-
| `no-restricted-theme-tokens` | `tokens`: patterns for theme custom properties; required when the rule is on
|
|
234
|
-
| `prefer-canonical-utilities` | `pxToRem` and `collapse` default to `true`; `logicalToPhysical` defaults to `false`; `preserveSpecificity` defaults to `true`. See the [rule options](lints/prefer-canonical-utilities
|
|
235
|
-
| `prefer-variant-directive` | `pxToRem`: treats `px` and `rem` in media queries as equal at 16px per `rem`; defaults to `false`
|
|
225
|
+
| Rule | Options |
|
|
226
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
227
|
+
| `conflicting-utilities` | `allowShorthandOverrides`: allows the supported overrides between shorthand and longhand utilities; defaults to `false`. `writingModes`: writing modes in which physical and logical utilities are compared; defaults to `["horizontal-tb"]`. `ignoredUtilities`: utility name globs whose pairs the rule does not report; defaults to `[]` |
|
|
228
|
+
| `invalid-marker-use` | `ignoredClasses`: marker class names that the rule ignores |
|
|
229
|
+
| `no-arbitrary-spacing` | `properties`: properties to check in addition to margin, padding, and gap |
|
|
230
|
+
| `no-restricted-utilities` | `utilities`: utility patterns, each with an optional message |
|
|
231
|
+
| `no-restricted-declarations` | `rules`: patterns for properties and values; every matching entry applies |
|
|
232
|
+
| `no-restricted-length-units` | `rules`: property patterns and the units to `disallow`; the last matching entry applies |
|
|
233
|
+
| `no-restricted-theme-tokens` | `tokens`: patterns for theme custom properties; required when the rule is on |
|
|
234
|
+
| `prefer-canonical-utilities` | `pxToRem` and `collapse` default to `true`; `logicalToPhysical` defaults to `false`; `preserveSpecificity` defaults to `true`. See the [rule options](https://stillwind.dev/docs/lints/prefer-canonical-utilities#options). |
|
|
235
|
+
| `prefer-variant-directive` | `pxToRem`: treats `px` and `rem` in media queries as equal at 16px per `rem`; defaults to `false` |
|
|
236
236
|
|
|
237
237
|
Patterns accept `*` for any text and `?` for one character. Utility and theme
|
|
238
238
|
token patterns are case-sensitive. Property and value patterns are not.
|
|
239
239
|
|
|
240
240
|
### Definitions of packages and plugins
|
|
241
241
|
|
|
242
|
-
[incompatible-property-value](lints/incompatible-property-value
|
|
242
|
+
[incompatible-property-value](https://stillwind.dev/docs/lints/incompatible-property-value) checks
|
|
243
243
|
the declarations that utility definitions write. By default, it checks only your
|
|
244
244
|
own definitions: your stylesheet, the stylesheets that it imports by a relative
|
|
245
245
|
or absolute path, and the plugin files that it loads by path. Two project-level
|
|
@@ -285,26 +285,26 @@ export const badge = style("bg-[#123456]");
|
|
|
285
285
|
In stylesheets, write the same text in `/* ... */` comments.
|
|
286
286
|
|
|
287
287
|
A comment hides the finding only. A misspelled utility still produces no CSS.
|
|
288
|
-
[invalid-lint-suppression](lints/invalid-lint-suppression
|
|
288
|
+
[invalid-lint-suppression](https://stillwind.dev/docs/lints/invalid-lint-suppression) reports a
|
|
289
289
|
malformed comment, and
|
|
290
|
-
[unused-lint-suppression](lints/unused-lint-suppression
|
|
290
|
+
[unused-lint-suppression](https://stillwind.dev/docs/lints/unused-lint-suppression) reports a
|
|
291
291
|
comment that suppresses nothing.
|
|
292
292
|
|
|
293
293
|
## Sorting
|
|
294
294
|
|
|
295
295
|
The `sort` field controls where `stillwind fmt`, the editor, and the
|
|
296
|
-
[Prettier plugin](formatters
|
|
296
|
+
[Prettier plugin](https://stillwind.dev/docs/formatters#prettier) sort utilities:
|
|
297
297
|
|
|
298
298
|
| Option | Sorts | Default |
|
|
299
299
|
| ----------------- | ----------------------------------------------------------- | ------- |
|
|
300
300
|
| `stringLiterals` | Utilities inside each string | `true` |
|
|
301
301
|
| `arrays` | Arguments, array items, and object entries by kind | `true` |
|
|
302
|
-
| `applyUtilities` | Utilities inside each [`@apply`](at-rules/apply
|
|
302
|
+
| `applyUtilities` | Utilities inside each [`@apply`](https://stillwind.dev/docs/at-rules/apply) rule | `true` |
|
|
303
303
|
| `applyStatements` | Adjacent `@apply` rules | `false` |
|
|
304
|
-
| `variantBlocks` | Adjacent [`@variant`](at-rules/variant
|
|
304
|
+
| `variantBlocks` | Adjacent [`@variant`](https://stillwind.dev/docs/at-rules/variant) blocks | `false` |
|
|
305
305
|
|
|
306
306
|
`sort: false` disables sorting, including `stillwind fmt` and the
|
|
307
|
-
[prefer-sorted-utilities](lints/prefer-sorted-utilities
|
|
307
|
+
[prefer-sorted-utilities](https://stillwind.dev/docs/lints/prefer-sorted-utilities) rule. Turning off
|
|
308
308
|
only that rule keeps `stillwind fmt` working.
|
|
309
309
|
|
|
310
310
|
The CLI checks the files that `files` selects. File patterns on the command line
|
package/docs/editors.md
CHANGED
|
@@ -8,7 +8,7 @@ description: "Install the Stillwind extension, sort and fix on save, and connect
|
|
|
8
8
|
The Stillwind language server shows diagnostics, generated CSS, and completion
|
|
9
9
|
from the active design system while you edit. It reads the same
|
|
10
10
|
`stillwind.config.ts` as the CLI and the build, and it checks unsaved files too.
|
|
11
|
-
Create that file with [Getting started](
|
|
11
|
+
Create that file with [Getting started](https://stillwind.dev/docs) first. The code of each diagnostic
|
|
12
12
|
links to the page on this website that explains the rule or error.
|
|
13
13
|
|
|
14
14
|
## VS Code
|
|
@@ -23,9 +23,9 @@ configuration as JavaScript.
|
|
|
23
23
|
|
|
24
24
|
### Features
|
|
25
25
|
|
|
26
|
-
- Hover over utilities, [`style()`](guides/style
|
|
26
|
+
- Hover over utilities, [`style()`](https://stillwind.dev/docs/guides/style) calls, or bound variables to see the generated CSS.
|
|
27
27
|
- Complete utilities, variants, and theme values.
|
|
28
|
-
- Complete quoted [`@plugin`](at-rules/plugin
|
|
28
|
+
- Complete quoted [`@plugin`](https://stillwind.dev/docs/at-rules/plugin) paths, and follow links to their modules.
|
|
29
29
|
- See colors, and open color pickers in utilities and theme references.
|
|
30
30
|
- Apply compiler Quick Fixes.
|
|
31
31
|
- Run **Stillwind: Sort Utilities**.
|
|
@@ -37,7 +37,7 @@ not report these at-rules as unknown.
|
|
|
37
37
|
|
|
38
38
|
Desktop VS Code runs the `@stillwind/cli` version that the workspace installs, so
|
|
39
39
|
editor diagnostics match the compiler of that version. Install
|
|
40
|
-
[the CLI](cli
|
|
40
|
+
[the CLI](https://stillwind.dev/docs/cli) in the project to get this match.
|
|
41
41
|
|
|
42
42
|
The extension uses its bundled language server when the workspace has no CLI, or
|
|
43
43
|
when the CLI fails to start. The **Stillwind** output channel shows which server
|
|
@@ -48,7 +48,7 @@ is running.
|
|
|
48
48
|
| Setting | Value |
|
|
49
49
|
| ----------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
50
50
|
| `stillwind.configFile` | A configuration path relative to the workspace root; empty searches for `stillwind.config.*` |
|
|
51
|
-
| `stillwind.completion.registryDirectives` | `true` suggests [registry directives](at-rules/registry-directives
|
|
51
|
+
| `stillwind.completion.registryDirectives` | `true` suggests [registry directives](https://stillwind.dev/docs/at-rules/registry-directives) in utility libraries |
|
|
52
52
|
|
|
53
53
|
Run **Stillwind: Restart Language Server** to reload configuration and dependencies.
|
|
54
54
|
|
|
@@ -67,7 +67,7 @@ off an option.
|
|
|
67
67
|
|
|
68
68
|
### Sort and fix on save
|
|
69
69
|
|
|
70
|
-
Use a [document formatter](formatters
|
|
70
|
+
Use a [document formatter](https://stillwind.dev/docs/formatters) for layout and whitespace, and add
|
|
71
71
|
Stillwind's Code Actions:
|
|
72
72
|
|
|
73
73
|
```json
|
|
@@ -85,7 +85,7 @@ comments. `source.sort.stillwind` sorts whatever the lint severity is.
|
|
|
85
85
|
|
|
86
86
|
`lint: false` in the project disables lint rules and fixes. `sort: false` also
|
|
87
87
|
disables explicit sorting commands. The
|
|
88
|
-
[`sort` field](configuration
|
|
88
|
+
[`sort` field](https://stillwind.dev/docs/configuration#sorting) selects what the editor sorts.
|
|
89
89
|
|
|
90
90
|
### Web VS Code
|
|
91
91
|
|
|
@@ -101,7 +101,7 @@ cross-origin isolation. These limits apply:
|
|
|
101
101
|
## Other editors
|
|
102
102
|
|
|
103
103
|
An editor with a Language Server Protocol client can start the language server from
|
|
104
|
-
the CLI. Install [the CLI](cli
|
|
104
|
+
the CLI. Install [the CLI](https://stillwind.dev/docs/cli) in the project, and run this command in the
|
|
105
105
|
workspace:
|
|
106
106
|
|
|
107
107
|
```sh
|
package/docs/errors/SW01003.md
CHANGED
|
@@ -66,4 +66,4 @@ export default defineConfig({
|
|
|
66
66
|
- Give the rules that need a list, such as `no-restricted-theme-tokens`, at least
|
|
67
67
|
one entry.
|
|
68
68
|
|
|
69
|
-
Each [lint rule page](
|
|
69
|
+
Each [lint rule page](https://stillwind.dev/docs/lints) describes its options.
|
package/docs/errors/SW10001.md
CHANGED
|
@@ -31,4 +31,4 @@ export const props = style("p-4");
|
|
|
31
31
|
right language, such as TypeScript with JSX for a `.tsx` file.
|
|
32
32
|
|
|
33
33
|
Errors in code that a Vue, Svelte, or Astro converter generated are reported as
|
|
34
|
-
[SW31004](SW31004
|
|
34
|
+
[SW31004](https://stillwind.dev/docs/errors/SW31004) instead.
|
package/docs/errors/SW10002.md
CHANGED
|
@@ -33,4 +33,4 @@ Fix the syntax at the location in the message, as in the example, where the
|
|
|
33
33
|
`<button>` element was not closed.
|
|
34
34
|
|
|
35
35
|
If the component is valid but its converted script is not, the error is
|
|
36
|
-
[SW31004](SW31004
|
|
36
|
+
[SW31004](https://stillwind.dev/docs/errors/SW31004) instead.
|
package/docs/errors/SW10004.md
CHANGED
|
@@ -6,7 +6,7 @@ description: "A ref method, ref condition, or animation call is stored or passed
|
|
|
6
6
|
# SW10004: Unconsumed macro use
|
|
7
7
|
|
|
8
8
|
Some calls have no value of their own. The compiler turns them into CSS at the
|
|
9
|
-
place where [`style()`](
|
|
9
|
+
place where [`style()`](https://stillwind.dev/docs/macros/style) uses them. This error occurs when such a call is stored in
|
|
10
10
|
a variable or passed to another function instead.
|
|
11
11
|
|
|
12
12
|
## Reported
|
|
@@ -31,11 +31,11 @@ Write the call directly where `style()` uses it:
|
|
|
31
31
|
|
|
32
32
|
| Call | Where to write it |
|
|
33
33
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
|
|
34
|
-
| [`card.asContainer()`](
|
|
35
|
-
| An animation such as [`fade("duration-300")`](
|
|
36
|
-
| [`card()`, `card("hover")`](
|
|
34
|
+
| [`card.asContainer()`](https://stillwind.dev/docs/macros/ref/as-container), [`card.asAnchor()`](https://stillwind.dev/docs/macros/ref/as-anchor), [`card.positionAnchor()`](https://stillwind.dev/docs/macros/ref/position-anchor), [`style.anchorScope()`](https://stillwind.dev/docs/macros/anchor-scope) | An argument of `style()` |
|
|
35
|
+
| An animation such as [`fade("duration-300")`](https://stillwind.dev/docs/macros/keyframes#apply-the-animation), and [`transition.for(key)`](https://stillwind.dev/docs/macros/view-transition) | An argument of `style()` |
|
|
36
|
+
| [`card()`, `card("hover")`](https://stillwind.dev/docs/macros/ref/condition), [`.in()`](https://stillwind.dev/docs/macros/ref/in), and [`card.at()`](https://stillwind.dev/docs/macros/ref/at) | A computed key, or a utility template |
|
|
37
37
|
|
|
38
38
|
You can still store and pass the definitions themselves, such as the result of
|
|
39
|
-
[`style.ref()`](
|
|
39
|
+
[`style.ref()`](https://stillwind.dev/docs/macros/ref) or [`style.keyframes()`](https://stillwind.dev/docs/macros/keyframes),
|
|
40
40
|
and the result of `style()`. To reuse a ref condition, store it with
|
|
41
|
-
[`style.when()`](
|
|
41
|
+
[`style.when()`](https://stillwind.dev/docs/macros/when).
|
package/docs/errors/SW10005.md
CHANGED
|
@@ -5,7 +5,7 @@ description: "The style function is used as a value instead of being called."
|
|
|
5
5
|
|
|
6
6
|
# SW10005: Untransformed macro reference
|
|
7
7
|
|
|
8
|
-
This error occurs when the code uses [`style`](
|
|
8
|
+
This error occurs when the code uses [`style`](https://stillwind.dev/docs/macros/style) or another
|
|
9
9
|
macro as a value, such as by storing it in a variable or passing it to a function.
|
|
10
10
|
The compiler replaces macro calls at build time and removes the import, so the
|
|
11
11
|
function does not exist at runtime.
|
package/docs/errors/SW11001.md
CHANGED
|
@@ -33,5 +33,5 @@ const second = style(base);
|
|
|
33
33
|
- If only one style extends the other, keep that dependency and remove the one
|
|
34
34
|
in the opposite direction.
|
|
35
35
|
|
|
36
|
-
A cycle between whole modules is reported as [SW11002](SW11002
|
|
36
|
+
A cycle between whole modules is reported as [SW11002](https://stillwind.dev/docs/errors/SW11002)
|
|
37
37
|
instead.
|
package/docs/errors/SW11003.md
CHANGED
package/docs/errors/SW12001.md
CHANGED
|
@@ -18,8 +18,8 @@ current = style.ref("panel");
|
|
|
18
18
|
style({ [current("hover")]: "underline" });
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
> SW12001: incompatible declaration identities: TS2322: Type 'StyleRef<string>' is not assignable to type 'StyleRef<"stillwind-identity/
|
|
22
|
-
> Type 'string' is not assignable to type '"stillwind-identity/
|
|
21
|
+
> SW12001: incompatible declaration identities: TS2322: Type 'StyleRef<string>' is not assignable to type 'StyleRef<"stillwind-identity/v2:eyJraW5kIjoicmVmIiwibW9kdWxlSWQiOiJSZWZlcmVuY2UudHN4IiwicGF0aCI6W10sIm9yZGluYWwiOjAsImJpbmRpbmdOYW1lIjoiY3VycmVudCJ9">'.
|
|
22
|
+
> Type 'string' is not assignable to type '"stillwind-identity/v2:eyJraW5kIjoicmVmIiwibW9kdWxlSWQiOiJSZWZlcmVuY2UudHN4IiwicGF0aCI6W10sIm9yZGluYWwiOjAsImJpbmRpbmdOYW1lIjoiY3VycmVudCJ9"'. Preserve declaration candidates with an explicit union or a generic parameter.
|
|
23
23
|
>
|
|
24
24
|
> Source format: Jsx
|
|
25
25
|
|
package/docs/errors/SW12002.md
CHANGED
|
@@ -39,4 +39,4 @@ style({ [current("hover")]: "underline" });
|
|
|
39
39
|
- Make the source modules of the definitions reachable through imports.
|
|
40
40
|
|
|
41
41
|
If the integration did not provide type information at all, the error is
|
|
42
|
-
[SW30001](SW30001
|
|
42
|
+
[SW30001](https://stillwind.dev/docs/errors/SW30001) instead.
|
package/docs/errors/SW13001.md
CHANGED
|
@@ -32,4 +32,4 @@ Fix the syntax that the message points to. In the example, the declaration needs
|
|
|
32
32
|
a colon after `color`.
|
|
33
33
|
|
|
34
34
|
A syntax error that the compiler finds while it collects custom properties is
|
|
35
|
-
reported as [SW14006](SW14006
|
|
35
|
+
reported as [SW14006](https://stillwind.dev/docs/errors/SW14006) instead.
|
package/docs/errors/SW13003.md
CHANGED
|
@@ -14,5 +14,5 @@ byte offset.
|
|
|
14
14
|
Check the delimiters around that position and any strings or comments inside the
|
|
15
15
|
block. If the stylesheet is valid, report the source and the Stillwind version.
|
|
16
16
|
|
|
17
|
-
An unclosed block normally produces [SW13002](SW13002
|
|
18
|
-
syntax errors can produce [SW13001](SW13001
|
|
17
|
+
An unclosed block normally produces [SW13002](https://stillwind.dev/docs/errors/SW13002). Other CSS
|
|
18
|
+
syntax errors can produce [SW13001](https://stillwind.dev/docs/errors/SW13001).
|
package/docs/errors/SW14001.md
CHANGED
|
@@ -41,4 +41,4 @@ style("p-4");
|
|
|
41
41
|
- Or write `@stillwind-slot utilities;` where the utilities should go.
|
|
42
42
|
- If you do not need a custom selection, import `stillwind` instead.
|
|
43
43
|
|
|
44
|
-
Other slots that a feature needs are reported as [SW14002](SW14002
|
|
44
|
+
Other slots that a feature needs are reported as [SW14002](https://stillwind.dev/docs/errors/SW14002).
|
package/docs/errors/SW14003.md
CHANGED
|
@@ -6,7 +6,7 @@ description: "An @stillwind-require-properties directive in your stylesheet has
|
|
|
6
6
|
# SW14003: Malformed property requirement
|
|
7
7
|
|
|
8
8
|
This error occurs when an
|
|
9
|
-
[`@stillwind-require-properties`](
|
|
9
|
+
[`@stillwind-require-properties`](https://stillwind.dev/docs/at-rules/stillwind-require-properties)
|
|
10
10
|
directive in your stylesheet has invalid syntax, such as an incomplete custom
|
|
11
11
|
property name. The directive lists the registered custom properties that a
|
|
12
12
|
utility needs.
|
|
@@ -20,7 +20,7 @@ utility needs.
|
|
|
20
20
|
}
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
> SW14003: invalid Stillwind property requirement at byte
|
|
23
|
+
> SW14003: invalid Stillwind property requirement at byte 9659
|
|
24
24
|
|
|
25
25
|
## Fixed
|
|
26
26
|
|
|
@@ -36,5 +36,5 @@ utility needs.
|
|
|
36
36
|
Write each name in full, including the leading `--`, as in the example.
|
|
37
37
|
|
|
38
38
|
A valid name that no registration provides is reported as
|
|
39
|
-
[SW14005](SW14005
|
|
40
|
-
plugin is reported as [SW14004](SW14004
|
|
39
|
+
[SW14005](https://stillwind.dev/docs/errors/SW14005). An invalid directive inside a utility from a
|
|
40
|
+
plugin is reported as [SW14004](https://stillwind.dev/docs/errors/SW14004).
|
package/docs/errors/SW14004.md
CHANGED
|
@@ -6,7 +6,7 @@ description: "A utility that you use has an @stillwind-require-properties direct
|
|
|
6
6
|
# SW14004: Malformed utility property requirement
|
|
7
7
|
|
|
8
8
|
This error occurs when you use a utility whose definition contains an invalid
|
|
9
|
-
[`@stillwind-require-properties`](
|
|
9
|
+
[`@stillwind-require-properties`](https://stillwind.dev/docs/at-rules/stillwind-require-properties)
|
|
10
10
|
directive. The message names the utility and the position in its definition.
|
|
11
11
|
The definition can be in your stylesheet or in a plugin.
|
|
12
12
|
|
|
@@ -45,4 +45,4 @@ style("spin-x");
|
|
|
45
45
|
- If the definition comes from a plugin, report the utility and the plugin
|
|
46
46
|
version to the plugin's maintainer. Turning off a lint rule does not help.
|
|
47
47
|
|
|
48
|
-
[SW14003](SW14003
|
|
48
|
+
[SW14003](https://stillwind.dev/docs/errors/SW14003) covers the same mistake in an ordinary CSS rule.
|
package/docs/errors/SW14005.md
CHANGED
|
@@ -6,7 +6,7 @@ description: "A utility requires a custom property that no @stillwind-property r
|
|
|
6
6
|
# SW14005: Required property is unregistered
|
|
7
7
|
|
|
8
8
|
This error occurs when a utility requires a custom property, but no
|
|
9
|
-
[`@stillwind-property`](
|
|
9
|
+
[`@stillwind-property`](https://stillwind.dev/docs/at-rules/stillwind-property) in the loaded
|
|
10
10
|
stylesheets registers it. The registration provides the initial value and
|
|
11
11
|
other support CSS. Assigning the property in a rule does not register it.
|
|
12
12
|
|
package/docs/errors/SW14006.md
CHANGED
|
@@ -16,4 +16,4 @@ it. If the authored CSS is valid, report a small reproduction and the Stillwind
|
|
|
16
16
|
and plugin versions.
|
|
17
17
|
|
|
18
18
|
Syntax errors found while the stylesheet loads usually produce
|
|
19
|
-
[SW13001](SW13001
|
|
19
|
+
[SW13001](https://stillwind.dev/docs/errors/SW13001) or [SW13002](https://stillwind.dev/docs/errors/SW13002) instead.
|
package/docs/errors/SW14007.md
CHANGED
|
@@ -16,7 +16,7 @@ such as no token name.
|
|
|
16
16
|
}
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
> SW14007: invalid --theme() reference at value byte
|
|
19
|
+
> SW14007: invalid --theme() reference at value byte 9666: invalid --theme() property `` at byte 0
|
|
20
20
|
|
|
21
21
|
## Fixed
|
|
22
22
|
|
|
@@ -32,4 +32,4 @@ Write the full name of a theme token, with an optional fallback after a comma,
|
|
|
32
32
|
such as `--theme(--color-brand, blue)`.
|
|
33
33
|
|
|
34
34
|
A valid reference to a token that the theme does not define is reported by
|
|
35
|
-
[invalid-theme-reference](
|
|
35
|
+
[invalid-theme-reference](https://stillwind.dev/docs/lints/invalid-theme-reference) instead.
|
package/docs/errors/SW14008.md
CHANGED
|
@@ -5,7 +5,7 @@ description: "A utility applies itself directly or through another utility."
|
|
|
5
5
|
|
|
6
6
|
# SW14008: Circular utility application
|
|
7
7
|
|
|
8
|
-
This error occurs when an [`@apply`](
|
|
8
|
+
This error occurs when an [`@apply`](https://stillwind.dev/docs/at-rules/apply) dependency returns
|
|
9
9
|
to a utility that is already being expanded. The cycle can pass through
|
|
10
10
|
several utilities.
|
|
11
11
|
|
package/docs/errors/SW30001.md
CHANGED
package/docs/errors/SW31001.md
CHANGED
package/docs/errors/SW31004.md
CHANGED
package/docs/errors/SW33005.md
CHANGED
|
@@ -17,4 +17,4 @@ character of several bytes. The message shows the offset and the operation.
|
|
|
17
17
|
and discard stored offsets after edits.
|
|
18
18
|
|
|
19
19
|
Errors from the APIs that convert positions are reported as
|
|
20
|
-
[SW31008](SW31008
|
|
20
|
+
[SW31008](https://stillwind.dev/docs/errors/SW31008) instead.
|
package/docs/errors/SW34002.md
CHANGED
|
@@ -12,6 +12,6 @@ nowhere to go.
|
|
|
12
12
|
## How to fix
|
|
13
13
|
|
|
14
14
|
- Check that the build tool runs the Stillwind integration on this file. See
|
|
15
|
-
[Framework integrations](
|
|
15
|
+
[Framework integrations](https://stillwind.dev/docs/integrations).
|
|
16
16
|
- In your own integration, create the virtual module before you render the
|
|
17
17
|
replacement imports.
|
package/docs/errors/SW90001.md
CHANGED
|
@@ -12,6 +12,6 @@ This error occurs when the CSS that the compiler generates for a style cannot be
|
|
|
12
12
|
[Open an issue](https://github.com/SegaraRai/stillwind/issues) with the error
|
|
13
13
|
message and:
|
|
14
14
|
|
|
15
|
-
- The [`style()`](
|
|
15
|
+
- The [`style()`](https://stillwind.dev/docs/macros/style) call or utility that causes the error
|
|
16
16
|
- Your stylesheet, or the parts that the utility uses
|
|
17
17
|
- The version of the Stillwind packages
|
package/docs/errors/SW90005.md
CHANGED
|
@@ -5,7 +5,7 @@ description: "The compiler chose a Stillwind import to replace, but did not plan
|
|
|
5
5
|
|
|
6
6
|
# SW90005: Macro anchor removal edit missing
|
|
7
7
|
|
|
8
|
-
This error occurs when the compiler chooses the `stillwind` import where it adds runtime imports, but does not plan the edit that replaces it. If the integration provided no usable import at all, the error is [SW34001](SW34001
|
|
8
|
+
This error occurs when the compiler chooses the `stillwind` import where it adds runtime imports, but does not plan the edit that replaces it. If the integration provided no usable import at all, the error is [SW34001](https://stillwind.dev/docs/errors/SW34001) instead.
|
|
9
9
|
|
|
10
10
|
## How to report
|
|
11
11
|
|
package/docs/errors/SW90006.md
CHANGED
|
@@ -7,7 +7,7 @@ description: "The compiler generated a code edit with an invalid link to the ori
|
|
|
7
7
|
|
|
8
8
|
This error occurs when an edit that the compiler generates links to the
|
|
9
9
|
original expression incorrectly. The message names the
|
|
10
|
-
[`style()`](
|
|
10
|
+
[`style()`](https://stillwind.dev/docs/macros/style) call.
|
|
11
11
|
|
|
12
12
|
## How to report
|
|
13
13
|
|