Answer the question
In order to leave comments, you need to log in
Dependency of an element on the implementation of a child element, is it acceptable according to BEM?
<div class="content">
<div class="content__text-block">
<div class="content__head">Крупный текст</div>
<div class="content__desc">обычный текст</div>
</div>
</div>
.content
&__text-block
font-size: 1.2rem
&__head
font-size: 2em
&__desc
font-size: 1em
Answer the question
In order to leave comments, you need to log in
Well, firstly, you need to work on the semantics in html. Team div-yank is not cool at all.
Here are two implementation options:
1)
<section class="content">
<div class="content__text-wrap">
<h2 class="content__title">Заголовок</h2>
<p class="content__descr">Блок с текстом</p>
</div>
</section>
<section class="content">
<div class="content__text-wrap article">
<h2 class="article__title">Заголовок</h2>
<p class="article__descr">Блок с текстом</p>
</div>
</section>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question