Answer the question
In order to leave comments, you need to log in
Is it possible to specify color, font for a block in styles?
Hello. I correctly understood that it is impossible to write styles (color, background, font, margin, padding) in the block. This must be done in modifiers. And what should be written in the block?
And I found this rule
The width of a block always fills all available space, the height of a block that has content is never fixed.
Answer the question
In order to leave comments, you need to log in
Everything is simple. The main concept is the separation of design from positioning.
But you need to try to write styles so that there are no problems in the future. Let's say it's unnecessary to write color: red on the block itself, because then you will have to interrupt it at the element.
The simplest example
<div class="page page_sidebar_right">
<div class="page__sidebar"></div>
<div class="page__content"></div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question