scss/selector-no-redundant-nesting-selector
See original GitHub issueI just updated to version 2.1.0 and this became an issue:
.foo {
&,
& .bar {
// some style
}
}
[stylelint] Unnecessary nesting selector (&) (scss/selector-no-redundant-nesting-selector)
I think that this should be a valid use case.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
selector-no-redundant-nesting-selector - stylelint-scss - GitHub
A collection of SCSS specific linting rules for Stylelint - stylelint-scss/README.md at master · stylelint-scss/stylelint-scss.
Read more >selector-nested-pattern - Stylelint
Non-standard selectors (e.g. selectors with Sass or Less interpolation) and selectors of rules nested within at-rules are ignored. The message secondary option ...
Read more >Should I always nest selectors in other selectors when using ...
My question is about nesting in sass or scss. It is a good thing from the readability perspective that we can nest selectors...
Read more >stylelint-scss - npm
Start using stylelint-scss in your project by running `npm i stylelint-scss`. ... "scss/selector-no-redundant-nesting-selector": true,.
Read more >Beware of Selector Nesting in Sass - SitePoint
Depending on the way it is used, it can yield a totally different CSS output. Here is a collection of simple examples. /*...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@testerez This is actually not a bug. You are getting the error because of
&
that is infront of.bar
.So these codes are actually equal after you compile them with Sass:
Fails linting
Passes linting
=
Oh yes you’re right. Thanks!