You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we want to use BEM for our CSS in a new project and are discussing one basic point internally: I thought BEM was introduced to get rid of too many classes in one single HTML tag, I thought there must only be one single class name in any tag but I see "good" examples in your documentation giving more than one class. I think we define most of any styling within mixins and include in the basis in the "default" definition of any block or element and then again in their modified item, adding styles just for them afterwards. As we use gzip on our servers we don't fear a bigger css file.
Just speaking of the browser performance issues which brought up BEM in my point of view I would prefer to be strict and never allow a second or even third class name.
Thanks for any answer clearing this up :)!
Regards,
Thorsten
This discussion was converted from issue #180 on September 12, 2022 19:33.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
we want to use BEM for our CSS in a new project and are discussing one basic point internally: I thought BEM was introduced to get rid of too many classes in one single HTML tag, I thought there must only be one single class name in any tag but I see "good" examples in your documentation giving more than one class. I think we define most of any styling within mixins and include in the basis in the "default" definition of any block or element and then again in their modified item, adding styles just for them afterwards. As we use gzip on our servers we don't fear a bigger css file.
Just speaking of the browser performance issues which brought up BEM in my point of view I would prefer to be strict and never allow a second or even third class name.
Thanks for any answer clearing this up :)!
Regards,
Thorsten
Beta Was this translation helpful? Give feedback.
All reactions