Should I use class button inside of an Block or should I create another class elemen__button and new style for It. #299
Unanswered
abhinavnepal7
asked this question in
Q&A
Replies: 1 comment
-
it depends. https://en.bem.info/methodology/css/#mixes Some say that you should create a new block if it does not have any external size, e.i. margin, width, height etc. and then you can optionally add style to it within a block as a block__element. I would probably style it as part of a bigger block and the first time I copy styles to another block, I can take the overlap CSS and have a base style for a new block, while my two existing blocks can add a few more styles that are different because of the context. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Just red the title.
Beta Was this translation helpful? Give feedback.
All reactions