S
S
Swaer2019-12-29 23:55:10
css
Swaer, 2019-12-29 23:55:10

How to learn to use the BEM methodology?

I can’t learn how to use the methodology, I can’t just take looking at the layout and break it into blocks and elements, everything seems wrong, are there useful guides or videos somewhere where they chew for fools?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Ankhena, 2020-12-30
@Ankhena

I can’t learn how to use the methodology, I can’t just take looking at the layout and break it into blocks and elements

BEM is secondary here.
Try to imagine that you need to make a layout for hundreds of similar (only similar) sites. Here is the first one ready. You take the second layout, sit down to work and realize that there is again a block, for example, the latest news, everything is the same, date-headline-text-details. Ah, how nice it would be to take and do ctrl+c ctrl+v from the previous work. Here, think about how to write down all the styles so that when reusing on the same site or in another project, you would need to rewrite as little code as possible, and the styles of internal elements would not "quarrel" with the code that is already in the new project.

P
profesor08, 2020-12-30
@profesor08

Use Styled Components and stop torturing yourself.

M
McBernar, 2020-12-30
@McBernar

You are too busy.
If you call an element a block, the BEM Inquisition will not descend from heaven and burn it at the stake.
Remember that nesting blocks within blocks and elements within elements is the norm.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question