Description
Registering a v4 custom-variant with a nested (pseudo-)selector causes "at-rule or selector expected". It compiles just fine.
@custom-variant poi {
&:hover,
&:focus-visible {
@slot;
}
}
The last 2 errors go away on removing the @slot
s ;
. However, this is not a viable option, as Prettier adds it back.
Oddly enough, it seems to replace this with... whatever this mess is.
This happens because the Regex matches up to a ;
: (\s+[^;]+)
. I'm not sure what the point of this is.
There is another matcher that uses { right below, but it never gets called, as the matcher with the ; already
replaces everything up to the slot semicolon.
Removing it seems to have done the trick. All tests pass with this change.
... now this throws. Even if I restore the original extension. lovely.
The space was added by Prettier, but this also happens without it. Adding other spaces restores it to [ *]
, so my PR allows a space before *
.
It seems like it doesn't like *. Replacing it with _ in the virtual document works fine. All tests pass with this change.
I'd like to work on this. I'll follow up with a PR in a bit.