I read BEM and some questions have appeared:
"The block should not affect its surroundings, i.e. the block should not specify external geometry (in the form of indents, borders affecting dimensions) and positioning." Those. I do not have the right to use such things for the block as margin, padding, border, position, float, etc. ???
How, then, are they so simply and beautifully reversed in the examples? https://ru.bem.info/methodology/key-concepts/ section "Free movement".
They give a beautiful example with the Head block inside which it is very easy and not forced to move 3 more blocks logo, search, auth. "So, for example, the logo and authorization form can be swapped. At the same time, it is not necessary to make changes to the CSS or JavaScript code of the block." - said in the example.
But in terms of HTML, we have the following code
<div class="headblock"> <div class="logoblock"></div> <div class="searchblock"></div> <div class="authblock"></div> </div>
(everything is fine, everything is beautiful. We have a block in which other blocks are nested)
And if in css at these blocks float will be installed? How to change these blocks in some places in this case without changing css?
Т.е. я не имею права пользоваться такими вещами для блока как margin, padding, border, position, float и т.д.???
- And how then? The power of thought? - Air