Components
Meta list
The v4 rule as a component: the icon stays beside its text.
Example#
<ul class="ha-meta" role="list">
<li class="ha-meta__item"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m2 9 10-5 10 5-10 5L2 9z"/><path d="M6 11.500V16c0 1.5 2.7 3 6 3s6-1.5 6-3v-4.5"/></svg><span>B.Sc. Student in Computer Science @ CIn/UFPE</span></li>
<li class="ha-meta__item"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M12 21s7-6.2 7-11.500A7 7 0 0 0 5 9.500C5 14.8 12 21 12 21z"/><circle cx="12" cy="9.5" r="2.5"/></svg><span>Recife, Brazil</span></li>
<li class="ha-meta__item"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/></svg><span>English, Portuguese, Spanish</span></li>
</ul>Under 520px each unit is on its own line. A long label wraps beside the icon.
Each item is inline-flex with align-items: flex-start. The icon is 16px, flex: none, and offset to line up with the first line of text. Wrap the text in a <span>.
| Class | Purpose |
|---|---|
ha-meta, --start | The row. Centered by default; --start aligns left. |
ha-meta__item | One icon and label unit. |
Do
- Wrap the label in a span.
- Keep icons decorative with aria-hidden.
Don't
- Put the icon in a separate block above the text.
- Let a row of meta items wrap into a ragged cloud on phones.