S
S
Sergey Sofichev2016-03-31 14:28:03
css
Sergey Sofichev, 2016-03-31 14:28:03

Sass by Bem or fidelity of thought?

.block {
    стиль1
    &__title {
        стили для титла
    }
    &_modificator {
        стиль2
        & .block__title {
            стиль для титла2
        }
    }
}

Question:
Is it possible to style a title in a block with a modifier without a cascade?
p.s. what is the best way to deal with this issue?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
timfcsm, 2016-03-31
@thisishappi

if you want to completely get rid of the cascade, then you need to add a modifier to each element ... but this is already from the area of ​​\u200b\u200bdelusions. If your element styles depend on the block modifier, then making one level of nesting is a normal solution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question