J
J
Johnny Smith2019-01-05 18:43:40
css
Johnny Smith, 2019-01-05 18:43:40

BEM global img{} rule?

Is using such code BEM?

img {
max-width: 100%;
height: auto;
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Proskurin, 2019-01-05
@Olek1

BEM does not use tag and ID selectors. Block and element styles are described through class selectors.

https://en.bem.info/methodology/css/#%D0%A1%D0%B5%...

H
hesrun, 2019-01-06
@hesrun

Yes, why not?
This is a generic style that is not actually a yulok element or modifier.
Similarly, if you need the b tag to be everywhere not the 900th, but the 700th, will you create a class for it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question