humanmade / humanmade/coding-standards
Stylelint: Consider ignoring `@media` when parsing max-nesting rule
- Dominant language
- PHP
- Stars
- 160
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Currently, we have a `max-nesting` rule that is very strict at only allowing 2 levels of nesting with `scss`, with the exception of `blockless-at-rules`. I think it might be beneficial to loosen this just a bit for `@media` rules by adding `"ignoreAtRules": ["media"]` to the general rule in Stylelint.
Stylelint currently already ignores `@media` at the first level in a nesting pattern when parsing for nesting depth, but it does not ignore `@media` when it resides down the chain. If we make the proposed change, `@media` levels will not affect the nesting depth evaluation, and we still shouldn't end up with too-specific of selectors.
Thoughts?
cc @peterwilsoncc @sambulance @goldenapples @rmccue @joemcgill @kirstyburgoine
Contributor guide
Assessment
This issue has not been assessed yet.