You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,15 @@ relying on `@apply`-ridden stylesheets.
10
10
.btn {
11
11
color: var(--color-input);
12
12
13
-
&:variant(hocus) {
13
+
&:--hocus {
14
14
color: var(--color-input-accent);
15
15
}
16
16
}
17
17
```
18
18
19
+
> [!NOTE]
20
+
> Previous version of this package used a custom syntax (`:variant()`) which has since been abandonned to instead follow the [CSS Extensions specification for custom selectors](https://drafts.csswg.org/css-extensions/#custom-selectors).
21
+
19
22
## Usage
20
23
21
24
```bash
@@ -73,20 +76,16 @@ Ex.:
73
76
@variant bar (&::after, .hi-mom);
74
77
75
78
/* This will be transformed into a matchable selector. */
76
-
.btn:variant(foo)/* .btn::after. */ {
79
+
.btn:--foo /* .btn::after. */ {
77
80
/* ... */
78
81
}
79
82
80
83
/* This will be transformed into an unmatchable selector. */
0 commit comments