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
|
@@ -9,8 +9,8 @@ Stillwind defines its built-in utilities and variants in CSS, in the files that
|
|
|
9
9
|
`@import "stillwind"` loads. These files use registry directives, which describe
|
|
10
10
|
cascade order, theme metadata, and other information that ordinary definitions
|
|
11
11
|
cannot express. Use them when you write a utility library. An application
|
|
12
|
-
stylesheet normally uses [`@utility`](utility
|
|
13
|
-
[`@custom-variant`](custom-variant
|
|
12
|
+
stylesheet normally uses [`@utility`](https://stillwind.dev/docs/at-rules/utility) and
|
|
13
|
+
[`@custom-variant`](https://stillwind.dev/docs/at-rules/custom-variant) instead.
|
|
14
14
|
|
|
15
15
|
Editors suggest these directives inside definitions and registry blocks. The
|
|
16
16
|
[built-in definitions](https://github.com/SegaraRai/stillwind/tree/main/packages/core/css)
|
|
@@ -25,7 +25,7 @@ show complete examples.
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Defines a utility with the same body language as
|
|
28
|
-
[`@utility`](utility
|
|
28
|
+
[`@utility`](https://stillwind.dev/docs/at-rules/utility). The position of the definition decides
|
|
29
29
|
its cascade order: a later definition wins over an earlier one when both set
|
|
30
30
|
the same property. The optional `tw-sort` descriptor names the property that
|
|
31
31
|
Tailwind-compatible class sorting uses for the definition. The header also
|
|
@@ -41,7 +41,7 @@ definitions and the `@utility` definitions of the stylesheet.
|
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
Defines a variant with the body language of
|
|
44
|
-
[`@custom-variant`](custom-variant
|
|
44
|
+
[`@custom-variant`](https://stillwind.dev/docs/at-rules/custom-variant). Its position decides the
|
|
45
45
|
output order of variant rules. The optional header is a comma-separated list:
|
|
46
46
|
|
|
47
47
|
| Descriptor | Value |
|
|
@@ -82,7 +82,7 @@ Places arbitrary-property candidates for the matching properties, such as
|
|
|
82
82
|
definitions end with `@stillwind-arbitrary-property *;`, so other arbitrary
|
|
83
83
|
properties come after every built-in utility. The statement also accepts the
|
|
84
84
|
matching properties again after
|
|
85
|
-
[`@stillwind-undef-arbitrary-property`](stillwind-undef-arbitrary-property
|
|
85
|
+
[`@stillwind-undef-arbitrary-property`](https://stillwind.dev/docs/at-rules/stillwind-undef-arbitrary-property).
|
|
86
86
|
|
|
87
87
|
## Theme metadata
|
|
88
88
|
|
|
@@ -94,7 +94,7 @@ matching properties again after
|
|
|
94
94
|
|
|
95
95
|
Declares a theme namespace. The bracketed types limit the arbitrary values and
|
|
96
96
|
typed variables that the namespace accepts.
|
|
97
|
-
[incompatible-theme-value](
|
|
97
|
+
[incompatible-theme-value](https://stillwind.dev/docs/lints/incompatible-theme-value) uses them to
|
|
98
98
|
check tokens.
|
|
99
99
|
|
|
100
100
|
`scale()` makes the token with the namespace name, such as `--spacing`, the scale
|
|
@@ -156,7 +156,7 @@ also accepts a named modifier, so `group/menu` adds the class `group/menu`.
|
|
|
156
156
|
|
|
157
157
|
The classes that the selectors of `@utility` and `@custom-variant` definitions
|
|
158
158
|
name are also marker classes.
|
|
159
|
-
[invalid-marker-use](
|
|
159
|
+
[invalid-marker-use](https://stillwind.dev/docs/lints/invalid-marker-use) reports a candidate that
|
|
160
160
|
names a marker class but cannot add it, such as `hover:group`.
|
|
161
161
|
|
|
162
162
|
### @stillwind-marker-source
|
|
@@ -177,6 +177,6 @@ that their dynamic utilities use.
|
|
|
177
177
|
|
|
178
178
|
Registers a pattern of utility or variant names that relate an element to
|
|
179
179
|
another element, such as `group-*` and `peer-*`.
|
|
180
|
-
[prefer-typed-relationships](
|
|
181
|
-
candidates that match a pattern, because [`style.ref()`](
|
|
180
|
+
[prefer-typed-relationships](https://stillwind.dev/docs/lints/prefer-typed-relationships) reports
|
|
181
|
+
candidates that match a pattern, because [`style.ref()`](https://stillwind.dev/docs/macros/ref) can
|
|
182
182
|
express the same relationship. The patterns do not change the generated CSS.
|
package/docs/at-rules/slot.md
CHANGED
|
@@ -11,7 +11,7 @@ description: "Mark where a variant definition inserts the styled content."
|
|
|
11
11
|
|
|
12
12
|
`@slot` marks where the block form of a variant definition inserts the
|
|
13
13
|
declarations of the utility. Write it in the body of
|
|
14
|
-
[`@custom-variant`](custom-variant
|
|
14
|
+
[`@custom-variant`](https://stillwind.dev/docs/at-rules/custom-variant), or of a registry variant
|
|
15
15
|
definition.
|
|
16
16
|
|
|
17
17
|
### Stylesheet
|
|
@@ -36,23 +36,23 @@ export const link = style("hocus:underline");
|
|
|
36
36
|
### Compiled code
|
|
37
37
|
|
|
38
38
|
```ts
|
|
39
|
-
export const link = {className:"
|
|
39
|
+
export const link = {className:"sw_77qpw"};
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
### Generated stylesheet without preflight
|
|
43
43
|
|
|
44
44
|
```css
|
|
45
|
-
/*! stillwind v0.
|
|
46
|
-
/*! tailwindcss v4.3.
|
|
45
|
+
/*! stillwind v0.10.0 | MIT License | https://stillwind.dev */
|
|
46
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
47
47
|
@layer properties, theme, base, components, utilities;
|
|
48
48
|
|
|
49
49
|
@layer utilities {
|
|
50
|
-
.
|
|
50
|
+
.sw_77qpw:hover, .sw_77qpw:focus-visible {
|
|
51
51
|
text-decoration-line: underline;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
`@slot` belongs to variant definitions only.
|
|
57
|
-
[`@stillwind-slot`](stillwind-slot
|
|
57
|
+
[`@stillwind-slot`](https://stillwind.dev/docs/at-rules/stillwind-slot) is a different at-rule: it
|
|
58
58
|
places generated CSS in your stylesheet.
|
|
@@ -13,7 +13,7 @@ description: "Define where style.css() places its utilities, theme values, and o
|
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
`@stillwind-css-template` defines a template for the string that
|
|
16
|
-
[`style.css()`](
|
|
16
|
+
[`style.css()`](https://stillwind.dev/docs/macros/css) returns. The `template` option of the call
|
|
17
17
|
selects the template by name, and `default` applies when the call names none.
|
|
18
18
|
Write it at the top level of the stylesheet.
|
|
19
19
|
|
|
@@ -47,7 +47,7 @@ export const css = style.css("p-4 text-blue-600", {
|
|
|
47
47
|
### Compiled code
|
|
48
48
|
|
|
49
49
|
```ts
|
|
50
|
-
export const css = "@layer component{:host{--color-blue-600:oklch(54.6% .245 262.881);--spacing:.25rem;padding:calc(var(--spacing)
|
|
50
|
+
export const css = "@layer component{:host{--color-blue-600:oklch(54.6% .245 262.881);--spacing:.25rem;padding:calc(var(--spacing)*4);color:var(--color-blue-600)}}";
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
The string contains the template's own CSS, and each slot receives the output of
|
|
@@ -82,7 +82,7 @@ export const css = style.css("p-4 text-blue-600", {
|
|
|
82
82
|
### Compiled code
|
|
83
83
|
|
|
84
84
|
```ts
|
|
85
|
-
export const css = ":host{padding:calc(var(--spacing)
|
|
85
|
+
export const css = ":host{padding:calc(var(--spacing)*4);color:var(--color-blue-600)}";
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
## The default template
|
|
@@ -118,10 +118,10 @@ can redefine `default` after `@import "stillwind"`.
|
|
|
118
118
|
## Rules
|
|
119
119
|
|
|
120
120
|
- A template must contain a `utilities` slot.
|
|
121
|
-
- A template cannot contain definitions, such as [`@theme`](theme
|
|
122
|
-
or [`@utility`](utility
|
|
121
|
+
- A template cannot contain definitions, such as [`@theme`](https://stillwind.dev/docs/at-rules/theme)
|
|
122
|
+
or [`@utility`](https://stillwind.dev/docs/at-rules/utility).
|
|
123
123
|
- The loader skips a template that breaks these rules, and
|
|
124
|
-
[invalid-css-directive](
|
|
124
|
+
[invalid-css-directive](https://stillwind.dev/docs/lints/invalid-css-directive) reports it.
|
|
125
125
|
- A template name that the stylesheet does not define reports
|
|
126
|
-
[invalid-css-input](
|
|
126
|
+
[invalid-css-input](https://stillwind.dev/docs/lints/invalid-css-input) at the call. The call then
|
|
127
127
|
uses no template, and its string contains only the rules.
|
|
@@ -46,25 +46,25 @@ export const icon = style("spin-[45deg]");
|
|
|
46
46
|
### Compiled code
|
|
47
47
|
|
|
48
48
|
```ts
|
|
49
|
-
export const icon = {className:"
|
|
49
|
+
export const icon = {className:"sw_wou1b"};
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
### Generated stylesheet without preflight
|
|
53
53
|
|
|
54
54
|
```css
|
|
55
|
-
/*! stillwind v0.
|
|
56
|
-
/*! tailwindcss v4.3.
|
|
55
|
+
/*! stillwind v0.10.0 | MIT License | https://stillwind.dev */
|
|
56
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
57
57
|
@layer properties, theme, base, components, utilities;
|
|
58
58
|
|
|
59
59
|
@layer utilities {
|
|
60
|
-
.
|
|
60
|
+
.sw_wou1b {
|
|
61
61
|
--spin-angle: 45deg;
|
|
62
62
|
rotate: var(--spin-angle);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
@layer properties {
|
|
67
|
-
@supports (((-webkit-hyphens: none)) and (not (margin-trim:
|
|
67
|
+
@supports (((-webkit-hyphens: none)) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
68
68
|
*, :before, :after, ::backdrop {
|
|
69
69
|
--spin-angle: 0deg;
|
|
70
70
|
}
|
|
@@ -80,7 +80,7 @@ export const icon = {className:"sw_7ic77"};
|
|
|
80
80
|
|
|
81
81
|
The `properties` slot places the `@property` rule. The `property-initials` slot
|
|
82
82
|
places the initial values, for browsers that ignore `@property`. See
|
|
83
|
-
[`@stillwind-slot`](stillwind-slot
|
|
83
|
+
[`@stillwind-slot`](https://stillwind.dev/docs/at-rules/stillwind-slot).
|
|
84
84
|
|
|
85
85
|
## Descriptors
|
|
86
86
|
|
|
@@ -101,7 +101,7 @@ removes them from the output:
|
|
|
101
101
|
both cases. `dependency` emits it only through `depends-on` or `group`.
|
|
102
102
|
|
|
103
103
|
A utility can also require a registration with
|
|
104
|
-
[`@stillwind-require-properties`](stillwind-require-properties
|
|
104
|
+
[`@stillwind-require-properties`](https://stillwind.dev/docs/at-rules/stillwind-require-properties).
|
|
105
105
|
|
|
106
106
|
## Value checks
|
|
107
107
|
|
|
@@ -120,9 +120,9 @@ of the listed properties:
|
|
|
120
120
|
}
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
[no-arbitrary-spacing](
|
|
124
|
-
[no-arbitrary-colors](
|
|
125
|
-
[no-restricted-length-units](
|
|
123
|
+
[no-arbitrary-spacing](https://stillwind.dev/docs/lints/no-arbitrary-spacing),
|
|
124
|
+
[no-arbitrary-colors](https://stillwind.dev/docs/lints/no-arbitrary-colors), and
|
|
125
|
+
[no-restricted-length-units](https://stillwind.dev/docs/lints/no-restricted-length-units) check
|
|
126
126
|
`box-[13px]` as a `width` and a `height` value. Each listed property uses its own
|
|
127
127
|
rule settings.
|
|
128
128
|
|
|
@@ -18,10 +18,10 @@ stylesheet, or inside another `@stillwind-registry` block.
|
|
|
18
18
|
|
|
19
19
|
| Registry | Resolves the utilities of |
|
|
20
20
|
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
-
| `default` | [`style()`](
|
|
22
|
-
| `keyframe` | The frames of [`style.keyframes()`](
|
|
21
|
+
| `default` | [`style()`](https://stillwind.dev/docs/macros/style), [`style.cva()`](https://stillwind.dev/docs/macros/cva), [`style.css()`](https://stillwind.dev/docs/macros/css), and [`@apply`](https://stillwind.dev/docs/at-rules/apply) |
|
|
22
|
+
| `keyframe` | The frames of [`style.keyframes()`](https://stillwind.dev/docs/macros/keyframes) |
|
|
23
23
|
| `animation` | The options of a keyframes use, such as `enter("both")` |
|
|
24
|
-
| `view-transition` | The `group`, `old`, `new`, and `imagePair` fields of [`style.viewTransition()`](
|
|
24
|
+
| `view-transition` | The `group`, `old`, `new`, and `imagePair` fields of [`style.viewTransition()`](https://stillwind.dev/docs/macros/view-transition) |
|
|
25
25
|
|
|
26
26
|
A definition outside every block changes `default`, `keyframe`, and
|
|
27
27
|
`view-transition`. `animation` starts empty and changes only through blocks that
|
|
@@ -30,9 +30,9 @@ name it.
|
|
|
30
30
|
## Example
|
|
31
31
|
|
|
32
32
|
The built-in `keyframe` and `view-transition` registries replace `duration-*`
|
|
33
|
-
with definitions that set animation properties. A top-level [`@utility`](utility
|
|
33
|
+
with definitions that set animation properties. A top-level [`@utility`](https://stillwind.dev/docs/at-rules/utility) with a
|
|
34
34
|
name that they replace also reaches those registries, and
|
|
35
|
-
[bypassed-undefinition](
|
|
35
|
+
[bypassed-undefinition](https://stillwind.dev/docs/lints/bypassed-undefinition) reports it. A
|
|
36
36
|
`default` block keeps the definition out of them:
|
|
37
37
|
|
|
38
38
|
### Stylesheet
|
|
@@ -56,14 +56,14 @@ export const panel = style("transition duration-slow");
|
|
|
56
56
|
### Compiled code
|
|
57
57
|
|
|
58
58
|
```ts
|
|
59
|
-
export const panel = {className:"
|
|
59
|
+
export const panel = {className:"sw_fd678"};
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
### Generated stylesheet without preflight
|
|
63
63
|
|
|
64
64
|
```css
|
|
65
|
-
/*! stillwind v0.
|
|
66
|
-
/*! tailwindcss v4.3.
|
|
65
|
+
/*! stillwind v0.10.0 | MIT License | https://stillwind.dev */
|
|
66
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
67
67
|
@layer properties, theme, base, components, utilities;
|
|
68
68
|
|
|
69
69
|
@layer theme {
|
|
@@ -74,7 +74,7 @@ export const panel = {className:"sw_2wahw"};
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
@layer utilities {
|
|
77
|
-
.
|
|
77
|
+
.sw_fd678 {
|
|
78
78
|
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
|
|
79
79
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
80
80
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
@@ -98,19 +98,19 @@ animations instead:
|
|
|
98
98
|
|
|
99
99
|
A block contains only these statements. Another statement is an error.
|
|
100
100
|
|
|
101
|
-
- [`@utility`](utility
|
|
102
|
-
and [`@variant`](variant
|
|
103
|
-
- [`@stillwind-undef-utility`](stillwind-undef-utility
|
|
104
|
-
[`@stillwind-undef-variant`](stillwind-undef-variant
|
|
105
|
-
[`@stillwind-undef-arbitrary-property`](stillwind-undef-arbitrary-property
|
|
101
|
+
- [`@utility`](https://stillwind.dev/docs/at-rules/utility), [`@custom-variant`](https://stillwind.dev/docs/at-rules/custom-variant),
|
|
102
|
+
and [`@variant`](https://stillwind.dev/docs/at-rules/variant) definitions
|
|
103
|
+
- [`@stillwind-undef-utility`](https://stillwind.dev/docs/at-rules/stillwind-undef-utility),
|
|
104
|
+
[`@stillwind-undef-variant`](https://stillwind.dev/docs/at-rules/stillwind-undef-variant), and
|
|
105
|
+
[`@stillwind-undef-arbitrary-property`](https://stillwind.dev/docs/at-rules/stillwind-undef-arbitrary-property)
|
|
106
106
|
- `@stillwind-arbitrary-property`, `@stillwind-utility`, and
|
|
107
|
-
`@stillwind-variant` from the [registry directives](registry-directives
|
|
107
|
+
`@stillwind-variant` from the [registry directives](https://stillwind.dev/docs/at-rules/registry-directives)
|
|
108
108
|
- A nested `@stillwind-registry` block. The innermost block decides.
|
|
109
109
|
|
|
110
110
|
The header names one or more registries, separated by commas. An unknown or
|
|
111
111
|
missing name is an error, and
|
|
112
|
-
[invalid-css-directive](
|
|
112
|
+
[invalid-css-directive](https://stillwind.dev/docs/lints/invalid-css-directive) reports it.
|
|
113
113
|
|
|
114
|
-
[Animations](
|
|
115
|
-
[View transitions](
|
|
114
|
+
[Animations](https://stillwind.dev/docs/guides/animations) and
|
|
115
|
+
[View transitions](https://stillwind.dev/docs/guides/view-transitions) show how utilities such as
|
|
116
116
|
`duration-300` set animation properties in those registries.
|
|
@@ -48,24 +48,24 @@ export const icon = style("spin-[45deg]");
|
|
|
48
48
|
### Compiled code
|
|
49
49
|
|
|
50
50
|
```ts
|
|
51
|
-
export const icon = {className:"
|
|
51
|
+
export const icon = {className:"sw_wou1b"};
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
### Generated stylesheet without preflight
|
|
55
55
|
|
|
56
56
|
```css
|
|
57
|
-
/*! stillwind v0.
|
|
58
|
-
/*! tailwindcss v4.3.
|
|
57
|
+
/*! stillwind v0.10.0 | MIT License | https://stillwind.dev */
|
|
58
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
59
59
|
@layer properties, theme, base, components, utilities;
|
|
60
60
|
|
|
61
61
|
@layer utilities {
|
|
62
|
-
.
|
|
62
|
+
.sw_wou1b {
|
|
63
63
|
--spin-angle: 45deg;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
@layer properties {
|
|
68
|
-
@supports (((-webkit-hyphens: none)) and (not (margin-trim:
|
|
68
|
+
@supports (((-webkit-hyphens: none)) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
69
69
|
*, :before, :after, ::backdrop {
|
|
70
70
|
--spin-angle: 0deg;
|
|
71
71
|
}
|
|
@@ -82,10 +82,10 @@ export const icon = {className:"sw_7ic77"};
|
|
|
82
82
|
## Errors
|
|
83
83
|
|
|
84
84
|
Each name must be a complete custom property name that starts with `--`. The
|
|
85
|
-
compiler reports an invalid name as [SW14003](
|
|
85
|
+
compiler reports an invalid name as [SW14003](https://stillwind.dev/docs/errors/SW14003) in your
|
|
86
86
|
stylesheet. When a module uses a utility with an invalid name, the compiler
|
|
87
|
-
reports [SW14004](
|
|
87
|
+
reports [SW14004](https://stillwind.dev/docs/errors/SW14004), including for plugin utilities.
|
|
88
88
|
|
|
89
|
-
A required name needs a [`@stillwind-property`](stillwind-property
|
|
89
|
+
A required name needs a [`@stillwind-property`](https://stillwind.dev/docs/at-rules/stillwind-property)
|
|
90
90
|
registration in the loaded stylesheets. A missing registration is
|
|
91
|
-
[SW14005](
|
|
91
|
+
[SW14005](https://stillwind.dev/docs/errors/SW14005).
|
|
@@ -12,7 +12,7 @@ description: "Place generated utilities, theme values, keyframes, and property r
|
|
|
12
12
|
`@stillwind-slot` marks where the compiler writes one kind of generated CSS.
|
|
13
13
|
`@import "stillwind"` already places every slot, so you need this at-rule only
|
|
14
14
|
when you write your own entry stylesheet or a
|
|
15
|
-
[CSS template](stillwind-css-template
|
|
15
|
+
[CSS template](https://stillwind.dev/docs/at-rules/stillwind-css-template).
|
|
16
16
|
|
|
17
17
|
## Slots
|
|
18
18
|
|
|
@@ -29,7 +29,7 @@ the selector:
|
|
|
29
29
|
|
|
30
30
|
| Slot | Inserts |
|
|
31
31
|
| --------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
32
|
-
| `theme` | The theme values that the generated CSS uses, and [`@theme static`](theme
|
|
32
|
+
| `theme` | The theme values that the generated CSS uses, and [`@theme static`](https://stillwind.dev/docs/at-rules/theme) values |
|
|
33
33
|
| `property-initials` | The initial values of the needed registrations |
|
|
34
34
|
| `property-initials inherited` | The initial values of the needed registrations with `inherits: true` only |
|
|
35
35
|
| `property-initials non-inherited` | The initial values of the needed registrations with `inherits: false` only |
|
|
@@ -74,12 +74,12 @@ declarations win.
|
|
|
74
74
|
## Rules
|
|
75
75
|
|
|
76
76
|
- A slot with an unknown name, or in a position that cannot contain its output,
|
|
77
|
-
is skipped. [invalid-css-directive](
|
|
77
|
+
is skipped. [invalid-css-directive](https://stillwind.dev/docs/lints/invalid-css-directive) reports
|
|
78
78
|
it.
|
|
79
|
-
- A stylesheet without a `utilities` slot is [SW14001](
|
|
79
|
+
- A stylesheet without a `utilities` slot is [SW14001](https://stillwind.dev/docs/errors/SW14001).
|
|
80
80
|
A missing slot for other generated CSS that a module needs, such as
|
|
81
|
-
`keyframes`, is [SW14002](
|
|
81
|
+
`keyframes`, is [SW14002](https://stillwind.dev/docs/errors/SW14002).
|
|
82
82
|
- A repeated slot repeats its output at every position.
|
|
83
83
|
|
|
84
|
-
`@stillwind-slot` places generated CSS. [`@slot`](slot
|
|
84
|
+
`@stillwind-slot` places generated CSS. [`@slot`](https://stillwind.dev/docs/at-rules/slot) is a
|
|
85
85
|
different at-rule for variant definitions.
|
|
@@ -15,7 +15,7 @@ An arbitrary property is a utility that writes a declaration directly, such as
|
|
|
15
15
|
`[color:red]`. `@stillwind-undef-arbitrary-property` rejects arbitrary
|
|
16
16
|
properties for the matching CSS properties. A rejected candidate produces no
|
|
17
17
|
CSS. Write the statement at the top level of the stylesheet or in a
|
|
18
|
-
[`@stillwind-registry`](stillwind-registry
|
|
18
|
+
[`@stillwind-registry`](https://stillwind.dev/docs/at-rules/stillwind-registry) block.
|
|
19
19
|
|
|
20
20
|
## Example
|
|
21
21
|
|
|
@@ -39,18 +39,18 @@ export const accepted = style("[--gutter:1rem]");
|
|
|
39
39
|
|
|
40
40
|
```ts
|
|
41
41
|
export const rejected = {};
|
|
42
|
-
export const accepted = {className:"
|
|
42
|
+
export const accepted = {className:"sw_a2es4"};
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
### Generated stylesheet without preflight
|
|
46
46
|
|
|
47
47
|
```css
|
|
48
|
-
/*! stillwind v0.
|
|
49
|
-
/*! tailwindcss v4.3.
|
|
48
|
+
/*! stillwind v0.10.0 | MIT License | https://stillwind.dev */
|
|
49
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
50
50
|
@layer properties, theme, base, components, utilities;
|
|
51
51
|
|
|
52
52
|
@layer utilities {
|
|
53
|
-
.
|
|
53
|
+
.sw_a2es4 {
|
|
54
54
|
--gutter: 1rem;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -64,12 +64,12 @@ properties again, so components can still set variables.
|
|
|
64
64
|
- The last matching statement decides for each property. A property that no
|
|
65
65
|
statement matches is accepted.
|
|
66
66
|
- `@stillwind-arbitrary-property pattern;` accepts the matching properties
|
|
67
|
-
again. The [registry directives](registry-directives
|
|
67
|
+
again. The [registry directives](https://stillwind.dev/docs/at-rules/registry-directives) describe
|
|
68
68
|
its other role.
|
|
69
69
|
- Patterns use the same forms as
|
|
70
|
-
[`@stillwind-undef-utility`](stillwind-undef-utility
|
|
70
|
+
[`@stillwind-undef-utility`](https://stillwind.dev/docs/at-rules/stillwind-undef-utility), with
|
|
71
71
|
property names instead of utility names.
|
|
72
72
|
|
|
73
73
|
To report arbitrary values without rejecting them, use lint rules such as
|
|
74
|
-
[no-arbitrary-colors](
|
|
75
|
-
[no-restricted-declarations](
|
|
74
|
+
[no-arbitrary-colors](https://stillwind.dev/docs/lints/no-arbitrary-colors) or
|
|
75
|
+
[no-restricted-declarations](https://stillwind.dev/docs/lints/no-restricted-declarations) instead.
|
|
@@ -13,9 +13,9 @@ description: "Remove built-in or plugin utility definitions that match a name or
|
|
|
13
13
|
|
|
14
14
|
`@stillwind-undef-utility` removes the matching utility definitions that
|
|
15
15
|
register before it. A removed utility becomes unknown, and
|
|
16
|
-
[unknown-utility](
|
|
16
|
+
[unknown-utility](https://stillwind.dev/docs/lints/unknown-utility) reports its uses. Write it at the
|
|
17
17
|
top level of the stylesheet or in a
|
|
18
|
-
[`@stillwind-registry`](stillwind-registry
|
|
18
|
+
[`@stillwind-registry`](https://stillwind.dev/docs/at-rules/stillwind-registry) block.
|
|
19
19
|
|
|
20
20
|
## Example
|
|
21
21
|
|
|
@@ -42,18 +42,18 @@ export const replaced = style("float-start");
|
|
|
42
42
|
|
|
43
43
|
```ts
|
|
44
44
|
export const removed = {};
|
|
45
|
-
export const replaced = {className:"
|
|
45
|
+
export const replaced = {className:"sw_vtxcq"};
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
### Generated stylesheet without preflight
|
|
49
49
|
|
|
50
50
|
```css
|
|
51
|
-
/*! stillwind v0.
|
|
52
|
-
/*! tailwindcss v4.3.
|
|
51
|
+
/*! stillwind v0.10.0 | MIT License | https://stillwind.dev */
|
|
52
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
53
53
|
@layer properties, theme, base, components, utilities;
|
|
54
54
|
|
|
55
55
|
@layer utilities {
|
|
56
|
-
.
|
|
56
|
+
.sw_vtxcq {
|
|
57
57
|
float: inline-start;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -71,25 +71,25 @@ pattern for negative names starts with `-`.
|
|
|
71
71
|
|
|
72
72
|
## Order
|
|
73
73
|
|
|
74
|
-
The statements that [`@plugin`](plugin
|
|
74
|
+
The statements that [`@plugin`](https://stillwind.dev/docs/at-rules/plugin) generates register first.
|
|
75
75
|
The other statements, including the built-in definitions that `@import "stillwind"`
|
|
76
76
|
loads, follow in source order. An undefinition removes only definitions that
|
|
77
77
|
register before it:
|
|
78
78
|
|
|
79
79
|
- It removes plugin utilities, wherever the `@plugin` statement stands.
|
|
80
80
|
- It removes the built-in utilities that `@import "stillwind"` loads before it.
|
|
81
|
-
- It does not remove a [`@utility`](utility
|
|
81
|
+
- It does not remove a [`@utility`](https://stillwind.dev/docs/at-rules/utility) that comes after it, so
|
|
82
82
|
you can remove a built-in utility and define your own utility with the same name.
|
|
83
83
|
|
|
84
84
|
A replacement with the same name keeps the cascade position of the removed
|
|
85
85
|
definition, so it wins against the same utilities as before. A definition with
|
|
86
86
|
another name takes the position where you write it. A definition without `*`
|
|
87
87
|
does not take the position of a removed `prefix-*` definition.
|
|
88
|
-
The [logical stylesheets](
|
|
88
|
+
The [logical stylesheets](https://stillwind.dev/docs/concepts/stylesheets#logical-axis-utilities)
|
|
89
89
|
replace utilities in this way.
|
|
90
90
|
|
|
91
91
|
Outside a block, the statement changes the `default`, `keyframe`, and
|
|
92
92
|
`view-transition` registries.
|
|
93
93
|
|
|
94
94
|
To report uses of a utility without removing it, use
|
|
95
|
-
[no-restricted-utilities](
|
|
95
|
+
[no-restricted-utilities](https://stillwind.dev/docs/lints/no-restricted-utilities) instead.
|
|
@@ -13,9 +13,9 @@ description: "Remove built-in or plugin variant definitions that match a name or
|
|
|
13
13
|
|
|
14
14
|
`@stillwind-undef-variant` removes the matching variant definitions that
|
|
15
15
|
register before it. A removed variant becomes unknown, and
|
|
16
|
-
[unknown-variant](
|
|
16
|
+
[unknown-variant](https://stillwind.dev/docs/lints/unknown-variant) reports its uses. Write it at the
|
|
17
17
|
top level of the stylesheet or in a
|
|
18
|
-
[`@stillwind-registry`](stillwind-registry
|
|
18
|
+
[`@stillwind-registry`](https://stillwind.dev/docs/at-rules/stillwind-registry) block.
|
|
19
19
|
|
|
20
20
|
## Example
|
|
21
21
|
|
|
@@ -42,14 +42,14 @@ export const toolbar = {};
|
|
|
42
42
|
### Generated stylesheet without preflight
|
|
43
43
|
|
|
44
44
|
```css
|
|
45
|
-
/*! stillwind v0.
|
|
46
|
-
/*! tailwindcss v4.3.
|
|
45
|
+
/*! stillwind v0.10.0 | MIT License | https://stillwind.dev */
|
|
46
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
47
47
|
@layer properties, theme, base, components, utilities;
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
`print:hidden` produces no class, because `print` is unknown.
|
|
51
51
|
|
|
52
52
|
Patterns and registration order work as in
|
|
53
|
-
[`@stillwind-undef-utility`](stillwind-undef-utility
|
|
54
|
-
[`@custom-variant`](custom-variant
|
|
53
|
+
[`@stillwind-undef-utility`](https://stillwind.dev/docs/at-rules/stillwind-undef-utility). A
|
|
54
|
+
[`@custom-variant`](https://stillwind.dev/docs/at-rules/custom-variant) after the statement can
|
|
55
55
|
define a variant with the removed name again.
|