Even though I consider this to be well formatted, this selector triggers multiple errors:
2:5 ✖ Expected indentation of 0 spaces stylistic/indentation
3:9 ✖ Expected indentation of 4 spaces stylistic/indentation
4:9 ✖ Expected indentation of 4 spaces stylistic/indentation
5:4 ✖ Unexpected whitespace before ")" stylistic/selector-pseudo-class-parentheses-space-inside
5:5 ✖ Expected indentation of 0 spaces stylistic/indentation
Correct form according to default settings (except indentation is to 4) would be like this, which I believe is not right, nor pretty.
.foo:where(
:not(
.bar,
.baz
)
) {
margin: 0;
}
Note that it keeps the closing parentheses on separate lines even with selector-pseudo-class-parentheses-space-inside set to its default value (never), but removes some spaces before. Similarly, when I nest the selector into media query, the formatting after fix is off. This time, the behaviour of closing parenthesis differ:
I think those inputs should be considered well-formatted and should not throw an error. Am I missing something in the settings or should this be considered a bug? I think it is a bug with multiline parentheses in selectors as opposed to property values.
I have a selector which looks like this:
Even though I consider this to be well formatted, this selector triggers multiple errors: 2:5 ✖ Expected indentation of 0 spaces stylistic/indentation 3:9 ✖ Expected indentation of 4 spaces stylistic/indentation 4:9 ✖ Expected indentation of 4 spaces stylistic/indentation 5:4 ✖ Unexpected whitespace before ")" stylistic/selector-pseudo-class-parentheses-space-inside 5:5 ✖ Expected indentation of 0 spaces stylistic/indentation
Correct form according to default settings (except indentation is to 4) would be like this, which I believe is not right, nor pretty.
Note that it keeps the closing parentheses on separate lines even with
selector-pseudo-class-parentheses-space-inside
set to its default value (never
), but removes some spaces before. Similarly, when I nest the selector into media query, the formatting after fix is off. This time, the behaviour of closing parenthesis differ:Same thing happens when SCSS nesting is used.
When simplified version is used, I get similar behaviour, except the
selector-pseudo-class-parentheses-space-inside
doesn't matter again:I think those inputs should be considered well-formatted and should not throw an error. Am I missing something in the settings or should this be considered a bug? I think it is a bug with multiline parentheses in selectors as opposed to property values.