Refactor CSS naming (drop BEM?) #2381
Replies: 3 comments
-
We already discussed this point here Following your example and looking at the code, almost every component has styles under I agree that Anyways, I don't think we should prioritize this right now |
Beta Was this translation helpful? Give feedback.
-
I don't know why two websites exist for BEM but the one reference by their creators, Yandex, is https://en.bem.info/. The naming convention we are following matches what is recommended there. That said, notice that BEM is more than a naming convention and, although I agree that other isolation techniques, like |
Beta Was this translation helpful? Give feedback.
-
We've agreed on using BEM. I'm closing this discussion, but it could of course be brought up in the future again. |
Beta Was this translation helpful? Give feedback.
-
We're currently using BEM for our CSS naming. There are some issues I see with that.
BEM aims to simplify the use of a unified CSS language by following BEM's naming conventions, but we're using
_
instead of--
(as defined in the official documentation) for modifiers, which goes against this purpose.BEM is also a tool that aims for modularity in CSS naming and avoids ambiguity, but by using SCSS with scoped CSS in our Vue components, we already can create modular scoped unambiguous CSS definitions.
Without BEM, this
could be achieved with this
And it would be just as modular, scoped and unambiguous, but avoid unnecessary hard to maintain complexity.
Beta Was this translation helpful? Give feedback.
All reactions