Answer the question
In order to leave comments, you need to log in
How to reset browser styles in BEM, how to correctly create modifiers, independent blocks?
Hello.
I'm learning BEM and I can't find answers to some questions:
1) How to reset default browser styles?
According to BEM
The block should not affect its environment, i.e. the block should not be given external geometry (in the form of padding, borders that affect dimensions) and positioning.
<ul class="nav">
<button class="button">
<ul class="parent__nav nav">
.button {
padding: 20px;
...
тут много других правил
}
.button {
...
тут много других правил
}
.button_size_large {
padding: 20px
}
.button_size_small {
padding: 10px
}
BEM is not a set of strict rules, but only a recommendation...And then wherever you look, everyone has their own BEM, with their own exceptions and rules, which are known only to the author.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question