Tracking
Tracking utilities set letter-spacing. Large text usually needs tighter
tracking; small text usually needs more.
Classes
Section titled “Classes”| Class | letter-spacing |
|---|---|
spacing-normal |
normal |
spacing-tight |
-0.05em |
spacing-wide |
0.1em |
spacing-wider |
0.5em |
Compact aliases: tracking-tighter, tracking-tight, tracking-normal,
tracking-wide, tracking-wider, tracking-widest.
<h2 class="spacing-tight">Large heading</h2><p class="spacing-wider text-xs font-weight-500">OVERLINE</p>The class reads --spacing:
<h1 class="spacing-tight" style="--spacing: -0.02em">One-off tracking</h1>Responsive tracking
Section titled “Responsive tracking”<h2 class="spacing-wide spacing-md-tight">Wide over a narrow viewport</h2>Responsive: spacing-sm-tight … spacing-2xl-wider.
These classes are in the separate responsive module: import
nightcss/utilities/responsive after the base bundle, or use
nightcss/full.
Guidance
Section titled “Guidance”- Tighten display type slightly; a hero set at default tracking often looks loose.
- Open up small uppercase labels so they stay legible.
- Avoid wide tracking on body copy: it slows reading and makes lines longer.
Use in CSS
Section titled “Use in CSS”The class is the markup shorthand. The same style in a component stylesheet:
.overline { letter-spacing: var(--nc-tracking-wider);}.hero { letter-spacing: var(--nc-tracking-tight);}The Sass subpackage exposes the same values: nc.nc-tracking("wider") and
nc.nc-tracking("tight"). See Sass subpackage.
A breakpoint is the same declaration inside a media query; you do not need a second class.