Alignment and Spacing
Several Tailwind classes are used to specify the horizontal alignment of text:
text-left |
text-center |
text-right |
text-justify |
They all change the CSS text-align property. The exact bounds of the alignment depend on the box the text is in. (I’ll talk more about that in Chapter 4, The Box.)
The CSS property for vertical alignment is vertical-align, and these are the Tailwind classes:
align-baseline |
align-top |
align-middle |
align-bottom |
align-text-top |
align-text-bottom |
align-sub |
align-super |
As with the horizontal alignment, exact positioning depends on the text box.
For line spacing, Tailwind has both a relative and an absolute option. The relative option starts with leading-none, which makes the line height exactly the size of the font. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access