Skip to content

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.

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

  • Uppercase text needs extra tracking; pair it with spacing-wider or spacing-wide from 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.
  • capitalize only affects the first letter of each word; it cannot fix a name that is deliberately mixed case.