Skip to content
This repository was archived by the owner on Jan 8, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions scss-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ linters:
convention: hyphenated_lowercase # or 'camel_case', or 'snake_case', or a regex pattern

NestingDepth:
enabled: true
max_depth: 3
ignore_parent_selectors: false
enabled: false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How far down do you need to go? I think turning this off is a little heavy-handed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My opinion is that there really isn't necessarily a max depth we should use, but this also really depends on what paradigm FF will be using for styling (which I don't think there necessarily is one). If we're using BEM, then I would actually not change this linting rule at all since it allows for flat css structure with a lot less risk of unintentional styling overlaps. But if we're not using BEM (which I don't really see true BEM in the few codebases I looked in), then nesting is critical, especially with such the frontend codebases being so fragmented (a CSS rule in component library can affect a different app, and that most likely will not be caught in QA).

And from my personal experience, most developers aren't super aware of BEM, and even if they are, there's quite a few rules you have to follow fairly strictly to take full advantage of it. This makes me generally avoid requiring the use of BEM by all engineers and instead encourage the use of "componentizing" styling rules by nesting. Does it make the html/styling less maintainable? Probably a little bit, but I think given the primary concern of our software is backend, so I'd rather not add more overhead for people developing HTML/CSS. If our business switches focus to frontend a bit more where we are prioritizing a more consistent styling across our frontends, then I think that's a good time to revisit.

So for me, it's kind of all or nothing - keep the rule and require BEM (or similar technique), or get rid of the rule and encourage componentizing through nesting for custom styling.


PlaceholderInExtend:
enabled: true
Expand Down