Skip to content

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.


All classes follow the structure:

.u--text-{value}
.u--text-{breakpoint}-{value}

Use this utility when:

  • You need to align text content (e.g., center, left, right)
  • You want to adjust text alignment at specific breakpoints

This utility supports responsive variants, using breakpoint prefixes like: desktop, laptop, tabletl, tabletm, tablets, mobile.


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...