S
S
Sergey Goryachev2016-10-25 21:40:52
css
Sergey Goryachev, 2016-10-25 21:40:52

How to layout such an element according to BEM?

While BEM will drive me, I will drive the Toaster community crazy) Excuse me)
Again I have a question about the correct structure of this freaky methodology.

<ul class="slider">
  <li>
    <h1>Заголовок слайда 1</h1>
    <h2>Текстовое содержимое слайда 1</h2>
  </li>
  <li>
    <h1>Заголовок слайда 2</h1>
    <h2>Текстовое содержимое слайда 2</h2>
  </li>
  <li>
    <h1>Заголовок слайда 3</h1>
    <h2>Текстовое содержимое слайда 3</h2>
  </li>
</ul>

So, I'm trying to figure it out.
slider is a block. It's clear here.
li is an element, so let's write li.slider__Item
But what are the h1 and h2 headings?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2016-10-25
@webirus

<ul class="slider">
  <li class="slider__item">
    <h1 class="slider__title">Заголовок слайда 1</h1>
    <p class="slider__text">Текстовое содержимое слайда 1</p>
  </li>
  <li class="slider__item">
    <h1 class="slider__title">Заголовок слайда 2</h1>
    <p class="slider__text">Текстовое содержимое слайда 2</p>
  </li>
  <li class="slider__item">
    <h1 class="slider__title">Заголовок слайда 3</h1>
    <p class="slider__text">Текстовое содержимое слайда 3</p>
  </li>
</ul>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question