Tailwind CSS
/Beginner
Line Height
Definition
Utilities for controlling the leading (line height) of an element.
Explain Like I'm New
The vertical breathing room between sentences in a paragraph. Tailwind calls this `leading`. `leading-none` squashes lines together. `leading-loose` spreads them far apart.
Real World Example
Blowing up a header to `text-6xl` often creates an ugly, massive gap between lines. Applying `leading-tight` pulls the header lines beautifully close together.
Common Use Cases
- •Readability optimization
- •Heading adjustments
Interactive Example
Interview Questions
basic
- What prefix does Tailwind use for line-height classes?
intermediate
- Why do large headers usually require `leading-tight` or `leading-none`?