stillwind 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +193 -0
- package/css/builtin-variants/sw-conditional.css +10 -1
- package/css/builtin-variants/tw-relationship.css +4 -4
- package/css/builtins.css +1 -1
- package/dist/{class-object-D7ZGJOf_.d.ts → class-object-BaK8uudd.d.ts} +2 -2
- package/dist/class-object-DNcjzcfH.js +6 -0
- package/dist/{class-object-D24FFYqO.js.map → class-object-DNcjzcfH.js.map} +1 -1
- package/dist/{class-string-CQHnc9GN.d.ts → class-string-C5YFtXQn.d.ts} +2 -2
- package/dist/class-string-KnYInbiw.js +6 -0
- package/dist/{class-string-Db8-oI4q.js.map → class-string-KnYInbiw.js.map} +1 -1
- package/dist/{cva-BwX07CFw.js → formats-Ctf2WFc-.js} +87 -2
- package/dist/formats-Ctf2WFc-.js.map +1 -0
- package/dist/formats-aeLCNAXl.d.ts +73 -0
- package/dist/frameworks/alpine.d.ts +3 -3
- package/dist/frameworks/alpine.js +1 -1
- package/dist/frameworks/alpine.js.map +1 -1
- package/dist/frameworks/astro.d.ts +3 -3
- package/dist/frameworks/astro.js +1 -1
- package/dist/frameworks/lit.d.ts +3 -3
- package/dist/frameworks/lit.js +1 -1
- package/dist/frameworks/lit.js.map +1 -1
- package/dist/frameworks/preact.d.ts +3 -3
- package/dist/frameworks/preact.js +1 -1
- package/dist/frameworks/qwik.d.ts +3 -3
- package/dist/frameworks/qwik.js +1 -1
- package/dist/frameworks/react.d.ts +2 -2
- package/dist/frameworks/react.js +1 -1
- package/dist/frameworks/solid.d.ts +3 -3
- package/dist/frameworks/solid.js +1 -1
- package/dist/frameworks/svelte.d.ts +3 -3
- package/dist/frameworks/svelte.js +1 -1
- package/dist/frameworks/vanilla.d.ts +3 -3
- package/dist/frameworks/vanilla.js +1 -1
- package/dist/frameworks/vue.d.ts +3 -3
- package/dist/frameworks/vue.js +1 -1
- package/dist/{index-RwVFpxhE.d.ts → index-DBpgaaD7.d.ts} +54 -5
- package/dist/macro/index.d.ts +2 -2
- package/dist/macro/index.js +1 -1
- package/dist/runtime/development.d.ts +47 -0
- package/dist/{development-J-JCSIm0.js → runtime/development.js} +41 -5
- package/dist/runtime/development.js.map +1 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +1 -0
- package/dist/{style-fTQbsVWZ.js → style-BE8vuLiO.js} +4 -1
- package/dist/style-BE8vuLiO.js.map +1 -0
- 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 +7 -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 +11 -8
- package/docs/concepts/css-ordering.md +19 -19
- package/docs/concepts/how-styles-compile.md +17 -17
- package/docs/concepts/stylesheets.md +4 -4
- package/docs/configuration.md +34 -34
- package/docs/editors.md +9 -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 +7 -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 +16 -16
- package/docs/guides/recommended-practices.md +18 -18
- package/docs/guides/responsive-styles.md +7 -7
- package/docs/guides/reusable-styles.md +10 -5
- package/docs/guides/runtime-conditions.md +6 -6
- package/docs/guides/style.md +42 -10
- package/docs/guides/tailwind-compatibility.md +23 -22
- 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 +4 -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 +45 -3
- 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 -73
- package/docs/lints/ineffective-anchor-scope.md +2 -2
- package/docs/lints/interfering-imported-style-base.md +22 -4
- 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 +52 -0
- 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 +3 -3
- 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 +17 -16
- package/docs/macros/index.md +10 -9
- 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 +9 -8
- package/docs/macros/ref/in.md +11 -11
- package/docs/macros/ref/index.md +17 -16
- package/docs/macros/ref/position-anchor.md +9 -9
- package/docs/macros/style.md +53 -27
- package/docs/macros/view-transition.md +17 -17
- package/docs/macros/when.md +129 -0
- 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 +14 -28
- package/dist/class-object-D24FFYqO.js +0 -6
- package/dist/class-string-Db8-oI4q.js +0 -6
- package/dist/cva-BwX07CFw.js.map +0 -1
- package/dist/cva-DSpDNBYi.d.ts +0 -9
- package/dist/development-DttPQc71.d.ts +0 -27
- package/dist/development-J-JCSIm0.js.map +0 -1
- package/dist/runtime/class-name-object-development.d.ts +0 -10
- package/dist/runtime/class-name-object-development.js +0 -18
- package/dist/runtime/class-name-object-development.js.map +0 -1
- package/dist/runtime/class-name-object.d.ts +0 -16
- package/dist/runtime/class-name-object.js +0 -31
- package/dist/runtime/class-name-object.js.map +0 -1
- package/dist/runtime/class-object-development.d.ts +0 -10
- package/dist/runtime/class-object-development.js +0 -18
- package/dist/runtime/class-object-development.js.map +0 -1
- package/dist/runtime/class-object.d.ts +0 -16
- package/dist/runtime/class-object.js +0 -31
- package/dist/runtime/class-object.js.map +0 -1
- package/dist/runtime/class-string-development.d.ts +0 -10
- package/dist/runtime/class-string-development.js +0 -18
- package/dist/runtime/class-string-development.js.map +0 -1
- package/dist/runtime/class-string.d.ts +0 -16
- package/dist/runtime/class-string.js +0 -31
- package/dist/runtime/class-string.js.map +0 -1
- package/dist/shared-B9IQXU6P.d.ts +0 -32
- package/dist/style-fTQbsVWZ.js.map +0 -1
|
@@ -21,7 +21,7 @@ stylesheet.
|
|
|
21
21
|
## Example
|
|
22
22
|
|
|
23
23
|
The short form takes a selector in parentheses. The block form wraps the
|
|
24
|
-
content with any rules, and [`@slot`](slot
|
|
24
|
+
content with any rules, and [`@slot`](https://stillwind.dev/docs/at-rules/slot) marks where the
|
|
25
25
|
content goes.
|
|
26
26
|
|
|
27
27
|
### Stylesheet
|
|
@@ -48,14 +48,14 @@ export const link = style("theme-dark:text-white hocus:underline");
|
|
|
48
48
|
### Compiled code
|
|
49
49
|
|
|
50
50
|
```ts
|
|
51
|
-
export const link = {className:"
|
|
51
|
+
export const link = {className:"sw_77cu9"};
|
|
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.9.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 theme {
|
|
@@ -65,11 +65,11 @@ export const link = {className:"sw_r7v8w"};
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
@layer utilities {
|
|
68
|
-
.
|
|
68
|
+
.sw_77cu9:where([data-theme="dark"], [data-theme="dark"] *) {
|
|
69
69
|
color: var(--color-white);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
.
|
|
72
|
+
.sw_77cu9:hover, .sw_77cu9:focus-visible {
|
|
73
73
|
text-decoration-line: underline;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -84,7 +84,7 @@ around `@slot`.
|
|
|
84
84
|
selector without `&` selects descendants:
|
|
85
85
|
`@custom-variant expanded ([aria-expanded="true"])` means
|
|
86
86
|
`& [aria-expanded="true"]`.
|
|
87
|
-
[implicit-nesting-selector](
|
|
87
|
+
[implicit-nesting-selector](https://stillwind.dev/docs/lints/implicit-nesting-selector)
|
|
88
88
|
reports such a selector, and its fix writes the `&` without changing the
|
|
89
89
|
meaning.
|
|
90
90
|
|
|
@@ -110,18 +110,18 @@ export const css = style.css("shell:block shell:p-4 [button]:rounded-md");
|
|
|
110
110
|
### Compiled code
|
|
111
111
|
|
|
112
112
|
```ts
|
|
113
|
-
export const css = ":where(:root,:host){--spacing:.25rem;--radius-md:.375rem}:host{padding:calc(var(--spacing)
|
|
113
|
+
export const css = ":where(:root,:host){--spacing:.25rem;--radius-md:.375rem}:host{padding:calc(var(--spacing)*4);display:block}button{border-radius:var(--radius-md)}";
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
In [`style.css()`](
|
|
117
|
-
element that the utility styles. In [`style()`](
|
|
116
|
+
In [`style.css()`](https://stillwind.dev/docs/macros/css), the first such variant selects the
|
|
117
|
+
element that the utility styles. In [`style()`](https://stillwind.dev/docs/macros/style), the rule
|
|
118
118
|
stays document-wide, and
|
|
119
|
-
[document-scoped-selector](
|
|
119
|
+
[document-scoped-selector](https://stillwind.dev/docs/lints/document-scoped-selector) reports it.
|
|
120
120
|
|
|
121
121
|
## Definitions with the same name
|
|
122
122
|
|
|
123
123
|
A later variant definition with the same name replaces the earlier one.
|
|
124
|
-
[duplicate-definition](
|
|
124
|
+
[duplicate-definition](https://stillwind.dev/docs/lints/duplicate-definition) reports it. To match
|
|
125
125
|
several selectors, list them in one definition.
|
|
126
126
|
|
|
127
127
|
The order of variant definitions decides the output order of rules with
|
package/docs/at-rules/index.md
CHANGED
|
@@ -5,7 +5,7 @@ description: "Find the at-rules that define tokens, utilities, and variants in y
|
|
|
5
5
|
|
|
6
6
|
# At-rule reference
|
|
7
7
|
|
|
8
|
-
Your stylesheet defines the design system that [`style()`](
|
|
8
|
+
Your stylesheet defines the design system that [`style()`](https://stillwind.dev/docs/macros/style)
|
|
9
9
|
uses. Besides ordinary CSS, it can contain at-rules that define tokens,
|
|
10
10
|
utilities, and variants, and at-rules that control where the generated CSS goes.
|
|
11
11
|
Some of them come from Tailwind CSS v4, and Stillwind evaluates them with its
|
|
@@ -19,27 +19,27 @@ generated stylesheet on these pages leaves out the preflight reset.
|
|
|
19
19
|
|
|
20
20
|
| At-rule | Use it to | Origin |
|
|
21
21
|
| ------------------------------------------------------------------------------ | ------------------------------------------------------------- | --------- |
|
|
22
|
-
| [`@theme`](theme
|
|
23
|
-
| [`@utility`](utility
|
|
24
|
-
| [`@custom-variant`](custom-variant
|
|
25
|
-
| [`@slot`](slot
|
|
26
|
-
| [`@plugin`](plugin
|
|
27
|
-
| [`@stillwind-property`](stillwind-property
|
|
28
|
-
| [`@stillwind-require-properties`](stillwind-require-properties
|
|
22
|
+
| [`@theme`](https://stillwind.dev/docs/at-rules/theme) | Define design tokens and shared values | Tailwind |
|
|
23
|
+
| [`@utility`](https://stillwind.dev/docs/at-rules/utility) | Define a utility or add declarations to an existing one | Tailwind |
|
|
24
|
+
| [`@custom-variant`](https://stillwind.dev/docs/at-rules/custom-variant) | Define a variant | Tailwind |
|
|
25
|
+
| [`@slot`](https://stillwind.dev/docs/at-rules/slot) | Mark where a variant definition inserts the styled content | Tailwind |
|
|
26
|
+
| [`@plugin`](https://stillwind.dev/docs/at-rules/plugin) | Load a Stillwind or Tailwind CSS v4 plugin | Tailwind |
|
|
27
|
+
| [`@stillwind-property`](https://stillwind.dev/docs/at-rules/stillwind-property) | Register a custom property that utilities need | Stillwind |
|
|
28
|
+
| [`@stillwind-require-properties`](https://stillwind.dev/docs/at-rules/stillwind-require-properties) | Declare the registered custom properties that a utility needs | Stillwind |
|
|
29
29
|
|
|
30
30
|
## Use utilities in your own rules
|
|
31
31
|
|
|
32
32
|
| At-rule | Use it to | Origin |
|
|
33
33
|
| ------------------------------------ | ----------------------------------------------------- | -------- |
|
|
34
|
-
| [`@apply`](apply
|
|
35
|
-
| [`@variant`](variant
|
|
34
|
+
| [`@apply`](https://stillwind.dev/docs/at-rules/apply) | Insert the declarations of utilities into a rule | Tailwind |
|
|
35
|
+
| [`@variant`](https://stillwind.dev/docs/at-rules/variant) | Apply variants, such as `hover` or `dark`, to a block | Tailwind |
|
|
36
36
|
|
|
37
37
|
## Place the generated CSS
|
|
38
38
|
|
|
39
39
|
| At-rule | Use it to | Origin |
|
|
40
40
|
| ------------------------------------------------------------------ | ------------------------------------------------------ | --------- |
|
|
41
|
-
| [`@stillwind-slot`](stillwind-slot
|
|
42
|
-
| [`@stillwind-css-template`](stillwind-css-template
|
|
41
|
+
| [`@stillwind-slot`](https://stillwind.dev/docs/at-rules/stillwind-slot) | Place generated utilities, theme values, and other CSS | Stillwind |
|
|
42
|
+
| [`@stillwind-css-template`](https://stillwind.dev/docs/at-rules/stillwind-css-template) | Define the output of [`style.css()`](https://stillwind.dev/docs/macros/css) | Stillwind |
|
|
43
43
|
|
|
44
44
|
`@import "stillwind"` already places every slot. Use these at-rules when you
|
|
45
45
|
write your own entry stylesheet or change the output of `style.css()`.
|
|
@@ -48,15 +48,15 @@ write your own entry stylesheet or change the output of `style.css()`.
|
|
|
48
48
|
|
|
49
49
|
| At-rule | Use it to | Origin |
|
|
50
50
|
| ------------------------------------------------------------------------------------------ | -------------------------------------------------------- | --------- |
|
|
51
|
-
| [`@stillwind-undef-utility`](stillwind-undef-utility
|
|
52
|
-
| [`@stillwind-undef-variant`](stillwind-undef-variant
|
|
53
|
-
| [`@stillwind-undef-arbitrary-property`](stillwind-undef-arbitrary-property
|
|
54
|
-
| [`@stillwind-registry`](stillwind-registry
|
|
51
|
+
| [`@stillwind-undef-utility`](https://stillwind.dev/docs/at-rules/stillwind-undef-utility) | Remove built-in or plugin utilities | Stillwind |
|
|
52
|
+
| [`@stillwind-undef-variant`](https://stillwind.dev/docs/at-rules/stillwind-undef-variant) | Remove built-in or plugin variants | Stillwind |
|
|
53
|
+
| [`@stillwind-undef-arbitrary-property`](https://stillwind.dev/docs/at-rules/stillwind-undef-arbitrary-property) | Reject arbitrary properties such as `[color:red]` | Stillwind |
|
|
54
|
+
| [`@stillwind-registry`](https://stillwind.dev/docs/at-rules/stillwind-registry) | Change definitions only in keyframes or view transitions | Stillwind |
|
|
55
55
|
|
|
56
56
|
## Write a utility library
|
|
57
57
|
|
|
58
58
|
Stillwind's built-in utilities and variants use
|
|
59
|
-
[registry directives](registry-directives
|
|
59
|
+
[registry directives](https://stillwind.dev/docs/at-rules/registry-directives), such as
|
|
60
60
|
`@stillwind-utility` and `@stillwind-theme-namespace`. Read them when you write
|
|
61
61
|
a utility library or read the built-in definitions. Application stylesheets
|
|
62
62
|
normally do not need them.
|
|
@@ -66,10 +66,10 @@ normally do not need them.
|
|
|
66
66
|
Stillwind reads its settings from `stillwind.config.ts` and generates utilities
|
|
67
67
|
only from `style()` calls. It ignores `@config`, `@source`, `@reference`, the
|
|
68
68
|
`important`, `source`, and `prefix` modifiers of `@import`, and the `prefix()`
|
|
69
|
-
option of `@theme`. [ignored-tailwind-feature](
|
|
69
|
+
option of `@theme`. [ignored-tailwind-feature](https://stillwind.dev/docs/lints/ignored-tailwind-feature)
|
|
70
70
|
reports them.
|
|
71
71
|
|
|
72
72
|
When the loader cannot use a Stillwind at-rule, it skips the statement and
|
|
73
73
|
compiles the rest of the stylesheet.
|
|
74
|
-
[invalid-css-directive](
|
|
74
|
+
[invalid-css-directive](https://stillwind.dev/docs/lints/invalid-css-directive) reports the skipped
|
|
75
75
|
statement.
|
package/docs/at-rules/plugin.md
CHANGED
|
@@ -22,7 +22,7 @@ replaces the statement. Write it at the top level of the stylesheet.
|
|
|
22
22
|
@plugin "@stillwind/plugin-iconify";
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
[`@stillwind/plugin-iconify`](
|
|
25
|
+
[`@stillwind/plugin-iconify`](https://stillwind.dev/docs/plugins/iconify) adds icon utilities such as
|
|
26
26
|
`icon-mdi--close`. Only the icons that your modules use reach the stylesheet.
|
|
27
27
|
|
|
28
28
|
## Finding the plugin
|
|
@@ -30,7 +30,7 @@ replaces the statement. Write it at the top level of the stylesheet.
|
|
|
30
30
|
The host looks up `name` in the `plugins` field of the project in
|
|
31
31
|
`stillwind.config.ts` first. Otherwise, it imports the package or the local file
|
|
32
32
|
from the stylesheet and uses its default export. See
|
|
33
|
-
[Configuration](
|
|
33
|
+
[Configuration](https://stillwind.dev/docs/configuration).
|
|
34
34
|
|
|
35
35
|
## Options
|
|
36
36
|
|
|
@@ -52,14 +52,14 @@ numeric text become those values. A quoted string loses its quotes, other text s
|
|
|
52
52
|
a string, and a comma-separated list becomes an array.
|
|
53
53
|
|
|
54
54
|
Definitions from a plugin register before the definitions of your stylesheet,
|
|
55
|
-
wherever the `@plugin` statement stands. A [`@utility`](utility
|
|
55
|
+
wherever the `@plugin` statement stands. A [`@utility`](https://stillwind.dev/docs/at-rules/utility) in your
|
|
56
56
|
stylesheet therefore adds to a plugin utility with the same name, and
|
|
57
|
-
[`@stillwind-undef-utility`](stillwind-undef-utility
|
|
57
|
+
[`@stillwind-undef-utility`](https://stillwind.dev/docs/at-rules/stillwind-undef-utility) can remove
|
|
58
58
|
plugin utilities.
|
|
59
59
|
|
|
60
60
|
A plugin can select elements by fixed class names, such as `not-prose`.
|
|
61
|
-
[`style()`](
|
|
62
|
-
[Tailwind CSS compatibility](
|
|
61
|
+
[`style()`](https://stillwind.dev/docs/macros/style) keeps these class names, as
|
|
62
|
+
[Tailwind CSS compatibility](https://stillwind.dev/docs/guides/tailwind-compatibility#class-names-that-a-plugins-selectors-use)
|
|
63
63
|
describes. That page also lists the tested plugins.
|
|
64
64
|
|
|
65
65
|
Each selector that a plugin passes to `addUtilities` or `addComponents` must
|
|
@@ -72,6 +72,6 @@ error.
|
|
|
72
72
|
A CSS package does not use `@plugin`. Load it with `@import`, such as
|
|
73
73
|
`@import "tw-animate-css";`.
|
|
74
74
|
|
|
75
|
-
[invalid-css-import](
|
|
75
|
+
[invalid-css-import](https://stillwind.dev/docs/lints/invalid-css-import) reports a plugin that the
|
|
76
76
|
host cannot find or load, and invalid options. The stylesheet loads without that
|
|
77
77
|
plugin.
|
|
@@ -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.9.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.9.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.9.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.9.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.9.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.
|