Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit b5a1829

Browse files
committed
chore: illustrate new syntax in readme
BREAKING CHANGE: use new syntax pattern matcher
1 parent ab70b9e commit b5a1829

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ relying on `@apply`-ridden stylesheets.
1010
.btn {
1111
color: var(--color-input);
1212

13-
&:variant(hocus) {
13+
&:--hocus {
1414
color: var(--color-input-accent);
1515
}
1616
}
1717
```
1818

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+
1922
## Usage
2023

2124
```bash
@@ -73,20 +76,16 @@ Ex.:
7376
@variant bar (&::after, .hi-mom);
7477

7578
/* This will be transformed into a matchable selector. */
76-
.btn:variant(foo) /* .btn::after. */ {
79+
.btn:--foo /* .btn::after. */ {
7780
/* ... */
7881
}
7982

8083
/* This will be transformed into an unmatchable selector. */
81-
.btn:variant(bar) /* .btn:is(::after, .hi-mom) */ {
84+
.btn:--bar /* .btn:is(::after, .hi-mom) */ {
8285
/* ... */
8386
}
8487
```
8588

86-
### Media queries and other at-rules
87-
88-
Not supported.
89-
9089
### Dynamic variants
9190

9291
Not supported.

0 commit comments

Comments
 (0)