DEV Community

Discussion on: Naming things is hard. Agree or disagree?

Collapse
 
eavichay profile image
Avichay Eyal

Get rid of bem. Naming would be easier when using aria tags with css. Bem is overestimated and an overweight for both bundle and runtime.

Collapse
 
jamesthomson profile image
James Thomson

Naming would be easier when using aria tags with css.

Care to expand on this?

Collapse
 
eavichay profile image
Avichay Eyal

Sure.
I tend to use semantics and autotags for automation. Meaning I have maximum 3 nesting rules to define an element style and it does not break when I change the structure or doesn't break hard when replacing css framework.

Example css:
[settings-view] [role=submit-button] { width: 3rem; }

This replaces the bem part and overrides default rule set including framework values

Collapse
 
eavichay profile image
Avichay Eyal

Soon I will publish a post about this approach, meanwhile you can view the draft here eavichay.svbtle.com/preview/rfmQb8...

Thread Thread
 
jamesthomson profile image
James Thomson

That's great Avichay 👍 be sure to let us know once the final version is published.