Answer the question
In order to leave comments, you need to log in
How to layout nested lists correctly in BEM?
How to layout nested lists correctly in BEM?
<!-- BEGIN .list -->
<div class="list">
<ul>
<li>
<span>Cum sociis natoque penatibus et</span>
</li>
<li>
<span>Magnis dis parturient montes luctus pharetra vulputate</span>
<ul>
<li>
<span>Cum sociis natoque penatibus et</span>
</li>
<li>
<span>Magnis dis parturient montes luctus pharetra
vulputate</span>
<ul>
<li>
<span>Cum sociis natoque penatibus et</span>
</li>
<li>
<span>Magnis dis parturient montes luctus pharetra
vulputate</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<!-- END .list -->
<!-- BEGIN .list -->
<ul class="list">
<!-- BEGIN .list__item -->
<li class="list__item">
<!-- BEGIN .list__text -->
<span class="list__text">Cum sociis natoque penatibus et</span>
<!-- END .list__text -->
</li>
<!-- END .list__item -->
<!-- BEGIN .list__item -->
<li class="list__item">
<!-- BEGIN .list__text -->
<span class="list__text">Magnis dis parturient montes luctus pharetra vulputate</span>
<!-- END .list__text -->
<!-- BEGIN .list -->
<ul class="list">
<!-- BEGIN .list__item -->
<li class="list__item">
<!-- BEGIN .list__text -->
<span class="list__text">Cum sociis natoque penatibus et</span>
<!-- END .list__text -->
</li>
<!-- END .list__item -->
<!-- BEGIN .list__item -->
<li class="list__item">
<!-- BEGIN .list__text -->
<span class="list__text">Magnis dis parturient montes luctus pharetra
vulputate</span>
<!-- END .list__text -->
<!-- BEGIN .list -->
<ul class="list">
<!-- BEGIN .list__item -->
<li class="list__item">
<!-- BEGIN .list__text -->
<span class="list__text">Cum sociis natoque penatibus et</span>
<!-- END .list__text -->
</li>
<!-- END .list__item -->
<!-- BEGIN .list__item -->
<li class="list__item">
<!-- BEGIN .list__text -->
<span class="list__text">Magnis dis parturient montes luctus pharetra
vulputate</span>
<!-- END .list__text -->
</li>
<!-- END .list__item -->
</ul>
<!-- END .list -->
</li>
<!-- END .list__item -->
</ul>
<!-- END .list -->
</li>
<!-- END .list__item -->
</ul>
<!-- END .list -->
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question