Text Transform
Transform utilities change the case of rendered text without changing the markup. Use them for labels and overlines; keep the underlying copy in its natural case.
Classes
Section titled “Classes”| Class | text-transform |
|---|---|
text-lowercase |
lowercase |
text-uppercase |
uppercase |
text-capitalize |
capitalize |
<p class="text-uppercase text-xs spacing-wider">FIELD NOTES</p><p class="text-capitalize">a sentence in sentence case</p>Responsive transform
Section titled “Responsive transform”<p class="text-uppercase text-md-lowercase">Uppercase only on small screens</p>Responsive: text-sm-uppercase … text-2xl-capitalize.
These classes are in the separate responsive module: import
nightcss/utilities/responsive after the base bundle, or use
nightcss/full.
Guidance
Section titled “Guidance”- Uppercase text needs extra tracking; pair it with
spacing-widerorspacing-widefrom Tracking. - Do not uppercase long passages: all-caps slows reading and removes word-shape cues.
- Screen readers read the DOM text, not the transformed case. Write the copy the way it should be announced, then style the case.
capitalizeonly affects the first letter of each word; it cannot fix a name that is deliberately mixed case.