L
L
Larisa2017-04-05 19:28:16
BEM
Larisa, 2017-04-05 19:28:16

I ask you to evaluate the correctness of the formation of the table according to BEM, how is it true?

I tried to put together all the information I found.
I ask you to help polish the approach to class naming according to BEM using this example

<table class="table">
        <caption class="table__caption">
            <h1>
                Данные по новорожденным за 2017 год
            </h1>
            <p>
                Согласно доступной статистике, средняя масса ребенка при рождении для полного 
срока беременности (сорок недель) составляют почти 3.5 кг, 
и приблизительно у 80% новорожденных вес колеблется между 2.75 — 4.25 кг.
            </p>          
        </caption>
        <thead class="table__header">
            <tr class="table__row table__row_header">
                <th class="table__cell table__cell_header">Имя</th>
                <th class="table__cell table__cell_header">Дата</th>
                <th class="table__cell table__cell_header">Рост</th>
                <th class="table__cell table__cell_header">Вес</th>
            </tr>
            <tr class="table__row table__row_header table__row_header-units">
                <td class="table__cell table__cell_header-units">фио</td>
                <td class="table__cell table__cell_header-units">гг.мм.дд</td>
                <td class="table__cell table__cell_header-units">в см.</td>
                <td class="table__cell table__cell_header-units">в гр.</td>
            </tr>
        </thead>
        <tfoot class="table__footer">
            <tr class="table__row table__row_footer">
                <td class="table__cell table__cell_footer" colspan="3">ИТОГО:</td>
                <td class="table__cell table__cell_footer">МНОГО</td>
            </tr>
        </tfoot>
        <tbody class="table__tbody">
            <tr class="table__row table__row_body">
                <td class="table__cell table__cell_body">Сидоров Иван Петрович</td>
                <td class="table__cell table__cell_body textLeft">2017.01.07</td>
                <td class="table__cell table__cell_body">53</td>
                <td class="table__cell table__cell_body">2500</td>
            </tr>
            <tr class="table__row table__row_body">
                <td class="table__cell table__cell_body">Иванов Петр Сидорович</td>
                <td class="table__cell table__cell_body textLeft">2017.02.01</td>
                <td class="table__cell table__cell_body">52</td>
                <td class="table__cell table__cell_body">4200</td>
            </tr>

        </tbody>
    </table>

Unfortunately, correct complete examples could not be found, many examples, but brief

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2017-04-05
@werty1001

There are no errors in the markup, the only, not very clear class textLeft, it is also quite possible to abandon cell modifiers in favor of a cascade from a string.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question