stillwind 0.1.0 → 0.4.1
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/README.md +19 -19
- package/css/builtin-utilities/tw-layout.css +2 -2
- package/css/logical/divide.css +67 -0
- package/css/logical/overflow.css +57 -0
- package/css/logical/overscroll.css +40 -0
- package/css/logical/resize.css +19 -0
- package/css/logical/snap.css +20 -0
- package/docs/at-rules/apply.md +1 -1
- package/docs/at-rules/custom-variant.md +3 -3
- package/docs/at-rules/plugin.md +2 -3
- package/docs/at-rules/slot.md +1 -1
- package/docs/at-rules/stillwind-css-template.md +2 -2
- package/docs/at-rules/stillwind-property.md +1 -1
- package/docs/at-rules/stillwind-registry.md +1 -1
- package/docs/at-rules/stillwind-require-properties.md +1 -1
- package/docs/at-rules/stillwind-undef-arbitrary-property.md +1 -1
- package/docs/at-rules/stillwind-undef-utility.md +8 -1
- package/docs/at-rules/stillwind-undef-variant.md +1 -1
- package/docs/at-rules/theme.md +5 -5
- package/docs/at-rules/utility.md +6 -5
- package/docs/at-rules/variant.md +1 -1
- package/docs/cli.md +375 -0
- package/docs/concepts/stylesheets.md +89 -0
- package/docs/configuration.md +44 -6
- package/docs/editors.md +110 -0
- package/docs/errors/SW10002.md +1 -1
- package/docs/formatters.md +87 -0
- package/docs/guides/lint-adoption.md +3 -12
- package/docs/guides/migrating-from-css.md +2 -0
- package/docs/guides/runtime-conditions.md +187 -0
- package/docs/guides/style.md +6 -5
- package/docs/guides/tailwind-compatibility.md +22 -1
- package/docs/guides/web-components.md +29 -0
- package/docs/index.md +6 -4
- package/docs/integrations.md +3 -0
- package/docs/lints/{prefer-explicit-nesting-selector.md → implicit-nesting-selector.md} +3 -3
- package/docs/lints/index.md +44 -43
- package/docs/lints/invalid-runtime-condition.md +2 -1
- package/docs/lints/invalid-utility.md +1 -1
- package/docs/lints/prefer-canonical-utilities.md +21 -4
- package/docs/lints/prefer-logical-properties.md +18 -0
- package/docs/lints/runtime-condition-requires-css-if.md +2 -1
- package/docs/lints/unknown-utility.md +3 -2
- package/docs/lints/unknown-variant.md +1 -1
- package/docs/lints/unmatched-host-selector.md +44 -0
- package/docs/macros/css.md +3 -3
- package/docs/plugins/iconify.md +270 -0
- package/docs/plugins/index.md +26 -0
- package/docs/utilities-and-variants.md +75 -0
- package/docs/why.md +1 -1
- package/package.json +11 -6
- package/skills/migrate-to-stillwind/SKILL.md +3 -1
- package/skills/stillwind/SKILL.md +34 -19
- package/docs/utilities.md +0 -35
|
@@ -5,13 +5,13 @@ description: Write and fix styles in a project that uses Stillwind, by loading t
|
|
|
5
5
|
|
|
6
6
|
# Stillwind
|
|
7
7
|
|
|
8
|
-
Read only the pages that the task needs. Use the documentation of the installed
|
|
9
|
-
|
|
8
|
+
Read only the pages that the task needs. Use the documentation of the installed package
|
|
9
|
+
in `node_modules/stillwind/docs/`, so that it matches the project's
|
|
10
10
|
Stillwind version. The `docs/` paths below are relative to the package root.
|
|
11
11
|
When this skill is installed without a local package, follow the skill's link to
|
|
12
|
-
its real directory and use `../../docs/` in the same package. If the skill was
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
its real directory and use `../../docs/` in the same package. If the skill was copied
|
|
13
|
+
without the package, start from https://stillwind.dev/docs/llms.txt, which lists the
|
|
14
|
+
Markdown version of each page.
|
|
15
15
|
|
|
16
16
|
## Task routing
|
|
17
17
|
|
|
@@ -28,9 +28,12 @@ which lists the Markdown version of each page.
|
|
|
28
28
|
| View transitions | `docs/guides/view-transitions.md`, `docs/macros/view-transition.md` |
|
|
29
29
|
| Theme tokens and design-system rules | `docs/guides/design-systems.md` |
|
|
30
30
|
| Custom utilities and variants | `docs/at-rules/index.md`, then the page of the at-rule |
|
|
31
|
-
| Available utilities
|
|
31
|
+
| Available utilities and variants | `docs/utilities-and-variants.md` |
|
|
32
32
|
| `stillwind.config.ts` | `docs/configuration.md` |
|
|
33
|
-
| CLI, CI, and lint presets | `docs/guides/lint-adoption.md`
|
|
33
|
+
| CLI, CI, and lint presets | `docs/guides/lint-adoption.md`, `docs/cli.md` |
|
|
34
|
+
| Editor setup and language server | `docs/editors.md` |
|
|
35
|
+
| Prettier and other formatters | `docs/formatters.md` |
|
|
36
|
+
| Official plugins and Iconify icons | `docs/plugins/index.md`, `docs/plugins/iconify.md` |
|
|
34
37
|
| A lint finding | `docs/lints/<rule>.md` |
|
|
35
38
|
| A compiler error such as `SW01001` | `docs/errors/<code>.md` |
|
|
36
39
|
| Shadow DOM and Web Components | `docs/guides/web-components.md` |
|
|
@@ -39,16 +42,28 @@ which lists the Markdown version of each page.
|
|
|
39
42
|
|
|
40
43
|
## Working rules
|
|
41
44
|
|
|
42
|
-
- Follow `docs/guides/recommended-practices.md`. Keep styles in `style()` calls
|
|
43
|
-
|
|
44
|
-
- Use theme tokens instead of arbitrary values.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
- Follow `docs/guides/recommended-practices.md`. Keep styles in `style()` calls on their
|
|
46
|
+
elements, and express states with attributes and variants.
|
|
47
|
+
- Use theme tokens instead of arbitrary values. Run `stillwind theme --source project`
|
|
48
|
+
to read the tokens of the project. When a value is missing, ask the user before you
|
|
49
|
+
add a token.
|
|
50
|
+
- Run `stillwind utilities <name>` to check a utility before you use it, such as
|
|
51
|
+
`stillwind utilities p-4 hover:bg-accent`. A `*` pattern searches names, but it omits
|
|
52
|
+
numeric and arbitrary values. `stillwind variants` works in the same way.
|
|
53
|
+
- When you know the CSS but not the utility, pass the declaration as an arbitrary property,
|
|
54
|
+
such as `stillwind utilities '[padding:16px]' '[&:focus]:[display:flex]'`, and use the
|
|
55
|
+
canonical spelling that the output names. An arbitrary property in the source is only an
|
|
56
|
+
intermediate step, which `stillwind lint --fix` also replaces. When no canonical spelling
|
|
57
|
+
exists, the declaration has no equivalent utility.
|
|
58
|
+
- Write custom utilities with `@apply` and variants, not with hand-written selectors or
|
|
59
|
+
media queries.
|
|
60
|
+
- After you change styles, run `stillwind lint --fix` and `stillwind fmt` through the
|
|
61
|
+
project's package manager, such as `vp exec stillwind lint`. Add `--format json` when
|
|
62
|
+
you parse the output.
|
|
63
|
+
- Run `stillwind inspect <file>:<line> --format json` to check the CSS that a
|
|
64
|
+
`style()` call generates. Paths, globs, and several targets also work.
|
|
65
|
+
- Read the page of each remaining finding before you fix it. With `--format json`,
|
|
66
|
+
the `docs` field of a finding names that page. Do not add a suppression comment or
|
|
67
|
+
relax the `lint` setting unless the user agrees. A suppression comment names the rule
|
|
68
|
+
and gives the reason after `--`.
|
|
54
69
|
- Check the result in the browser when a change can affect the layout.
|
package/docs/utilities.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Built-in utilities"
|
|
3
|
-
description: "Look up the CSS of a utility, or find the canonical utility for CSS declarations."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Built-in utilities
|
|
7
|
-
|
|
8
|
-
Type a utility to see its CSS, or type CSS declarations to find the utility that
|
|
9
|
-
produces them. Arbitrary values, such as `p-[16px]`, resolve to their canonical
|
|
10
|
-
spelling. The URL keeps your input, so you can share the results.
|
|
11
|
-
|
|
12
|
-
## Read the results
|
|
13
|
-
|
|
14
|
-
Each result shows one utility and its declarations. `&` stands for the styled
|
|
15
|
-
element. Comments show the resolved theme values and pixel sizes. A result for
|
|
16
|
-
CSS declarations names the declaration that it comes from.
|
|
17
|
-
|
|
18
|
-
The results leave out the theme variables and other supporting CSS that the full
|
|
19
|
-
stylesheet contains. The [macro reference](macros/index.md) shows complete
|
|
20
|
-
generated stylesheets.
|
|
21
|
-
|
|
22
|
-
A declaration without a matching utility becomes an arbitrary property, such as
|
|
23
|
-
`[hyphens:manual]`. Variants and shorthand properties can change what a utility
|
|
24
|
-
does, so compare its declarations with your CSS before you replace it.
|
|
25
|
-
|
|
26
|
-
## What the lookup covers
|
|
27
|
-
|
|
28
|
-
The lookup runs the Stillwind compiler in your browser with the default theme.
|
|
29
|
-
It downloads the compiler when the page opens. Utilities from your own `@theme`
|
|
30
|
-
tokens, such as `bg-brand`, do not resolve here. See
|
|
31
|
-
[Design systems](guides/design-systems.md) to add them, and hover over a
|
|
32
|
-
utility in the editor to check it in your project.
|
|
33
|
-
|
|
34
|
-
The editor and the CLI report non-canonical spellings with
|
|
35
|
-
[prefer-canonical-utilities](lints/prefer-canonical-utilities.md).
|