stylelint-bem
stylelint-bem copied to clipboard
Rule expected but ")" found on `:is` with nested selectors
Type of issue
- Bug report
Environment
- Node.js v16.14.2
- Mac OS 12.4
- NPM: 8.5.0
- Using
postcss-scss
ascustomSyntax
Expected behavior
When using a nested :is
selector, no error should be thrown.
Current behavior
The fellowing error is thrown:
- Rule expected but ")" found
plugin/stylelint-bem-namics
Steps to reproduce the behavior
Create an stylesheet with the fellowing CSS code:
.u-underline:is(:focus:not(.has-invisible-focus), :hover:not([disabled])) {
text-decoration: underline;
}
Thanks for your bug report. I can't find a quick solution right now. We'll have to take a closer look. PR's are of course also welcome
In the meantime the bug can be worked around e.g. with ignore-codes https://stylelint.io/user-guide/ignore-code/ or with less complex selectors ;-)
Same with :has
selector:
.select {
&:has(> .icon:not(.icon--chevron)) {
.select__native,
.select__custom__trigger {
padding-inline-start: 46px;
}
}
}
Rule expected but ")" found. on &:has(> .icon:not(.icon--chevron)) {
and .select__native
.
A fix for this was published as version 9 (Release Notes) You are welcome to test it.
fixed and closed