-
-
Notifications
You must be signed in to change notification settings - Fork 87
Multiple & references inside :is(), :where(), :has() not fully resolved #350
Copy link
Copy link
Open
Description
Description
When multiple & (parent selector) references appear inside :is(), :where(), or :has() pseudo-class arguments, stylis only resolves the first & but leaves subsequent ones as literal & characters.
Reproduction
import { compile, serialize, stringify } from 'stylis';
const result = compile('.parent .child { :is(&:hover, .other:hover &) .target { color: red; } }');
console.log(serialize(result, stringify));Expected output
:is(.parent .child:hover, .other:hover .parent .child) .target{color:red;}Actual output
:is(.parent .child:hover, .other:hover &) .target{color:red;}The second & in the :is() arguments is not replaced with the parent selector.
Environment
stylis 4.3.6
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels