π 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β.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
) - You want to adjust text alignment at specific breakpoints
π§ͺ Responsive usage
Section titled βπ§ͺ Responsive usageβThis utility supports responsive variants, using breakpoint prefixes like:
desktop
, laptop
, tabletl
, tabletm
, tablets
, mobile
.
β How to use
Section titled ββ How to useβYou can apply them directly in HTML:
<p class="u--text-center u--text-tabletl-left"> Centered on desktop, left-aligned on tablet</p>
Or extend them in SCSS if you have a custom class:
.c--card-a { &__title { @extend .u--text-center; @extend .u--text-tabletl-left; }}