-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
We are using JSS in react to define rulesets with selectors like these
const useStyles = createUseStyles((theme) => ({
category: {
'&:has(input:checked)': {In tests we use jsdom@26.1.0 to render components with those styles.
For some reason I don't completely understand, the selector that gets parsed in https://github.com/dperini/nwsapi/blob/master/src/nwsapi.js#L1569 ends up looking like 'input#9yecS.input-0-2-453 input:checked' and the parsing result ends up being:
[
"input",
"",
"",
"yecS.input-0-2-453 input:checked",
]This produces invalid selector and when applied produces DOMException.
The interesting thing is that if we remove :has from the original rule, there is no such problem.
Metadata
Metadata
Assignees
Labels
No labels