Text align
The text-align utility allows you to control the horizontal alignment of inline text within an element.
It supports both static and responsive variants generated through mixins and loops.
Naming convention
Section titled “Naming convention”All classes follow the structure:
.u--text-{value}.u--text-{breakpoint}-{value}When to use
Section titled “When to use”Use this utility when:
- You need to align text content (e.g.,
center,left,right) - You want to adjust text alignment at specific breakpoints
Responsive variants
Section titled “Responsive variants”This utility supports responsive variants, using breakpoint prefixes like:
desktop, laptop, tabletl, tabletm, tablets, mobile.
How to use
Section titled “How to use”In HTML
<p class="u--text-center u--text-tabletl-left"> Centered on desktop, left-aligned on tablet</p>In CSS
.c--card-a { &__title { @extend .u--text-center; @extend .u--text-tabletl-left; }}Knowledge Check
Test your understanding of this section
Loading questions...