text-left/center/right/justify/start/end. This family contains 6 generated classes in Nakshora 3.1.
Classes#
| Class | Generated CSS |
|---|---|
text-left | text-align: left; |
text-center | text-align: center; |
text-right | text-align: right; |
text-justify | text-align: justify; |
text-start | text-align: start; |
text-end | text-align: end; |
Example#
example
<div class="text-center">
<h2>Centered hero copy</h2>
</div>Responsive & variants#
Every class here accepts screen prefixes (xxs: … 5xl:) and state variants — md:hover:p-4 style stacks compile to a single media query. See responsive/index|Responsive design and variants/index|Variants.
Best practices#
- Logical start/end beat left/right for RTL support
- Justify needs hyphenation to avoid rivers
Common mistakes#
- text-center on a flex container does nothing — use justify-*
Related#
colors/index|Text color · utilities/typography/font-size|Font size
