S
S
svr52018-02-28 15:23:44
css
svr5, 2018-02-28 15:23:44

How to implement according to BEM?

Please help me to correctly implement such a thing according to BEM with a price
of 150 r / kg
Where the price is 150 - of one size
P - rubles of a different size and equal to the top of the price together with (/kg)
/ kg - even smaller size
I did this: 1 - made a block general and he prescribed display: flex
2 - rubles with kilograms in one more __ wrapper and prescribed flex
3- for this element and already equalized margin inside
That's how I did it, but I feel that it's all somehow ugly ((
PS wanted to implement everything inline-block and span for rubles and kilograms, but the whole project is based on BEM and flexbox

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Egor Zhivagin, 2018-02-28
@Krasnodar_etc

You can make one common block for all with style

align-items: flex-start;
display: flex;

And put these 3 blocks in it. And set the color and size directly to them.
Weight move through self-alignor by the same margin

N
Nikita Kit, 2018-02-28
@ShadowOfCasper

Do not be too lazy to sit at the docks for an hour and learn everything you need about BAM. It will be much more useful for you than asking for an example of a finished code
https://ru.bem.info/methodology/key-concepts/
https://ru.bem.info/methodology/naming-convention/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question