line-height

Class Description

leading

Sets line-height via --leading. Scaled. Use [leading] for raw values.

CSS Rules

.leading {
  line-height: calc(var(--spacing) * var(--leading));
}

Usage

The .leading class is flagged as a value-driven selector. The variable --leading is required.
<element class="leading" style="--leading: /* value */;" />

Responsive

Prefix .leading utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:leading" style="--md-leading: /* value */;" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="leading:hover" style="--leading-hover: /* value */;" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="leading:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before leading::before" style="--leading-before: /* value */;" />

<element class="content-after leading::after" style="--leading-after: /* value */;" />

Shorthand

Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime processes this for you. Unlike :hover that is generating CSS on the fly, shorthand only splits it and appends the corresponding style.

<!-- Input -->
<element class="leading=value" />

<!-- Output -->
<element class="leading" style="--leading: value;" />

CLS Alert

This feature may cause CLS (Cumulative Layout Shift). Make sure to include a z-not-ready class in your <head> tag.

.leading Sets line-height via --leading. Scaled. Use [leading] for raw values.

[leading]

Applies raw --leading directly to line-height. Use leading utilities for scaled text spacing when available.

CSS Rules

.\[leading\] {
  line-height: var(--leading);
}

Usage

The .[leading] class is flagged as a value-driven selector. The variable --leading is required.
<element class="[leading]" style="--leading: /* value */;" />

Responsive

Prefix .[leading] utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:[leading]" style="--md-leading: /* value */;" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="[leading]:hover" style="--leading-hover: /* value */;" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="[leading]:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before [leading]::before" style="--leading-before: /* value */;" />

<element class="content-after [leading]::after" style="--leading-after: /* value */;" />

Shorthand

Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime processes this for you. Unlike :hover that is generating CSS on the fly, shorthand only splits it and appends the corresponding style.

<!-- Input -->
<element class="[leading]=value" />

<!-- Output -->
<element class="[leading]" style="--leading: value;" />

CLS Alert

This feature may cause CLS (Cumulative Layout Shift). Make sure to include a z-not-ready class in your <head> tag.

.[leading] Applies raw --leading directly to line-height. Use leading utilities for scaled text spacing when available.

leading-loose

Sets line-height to loose preset.

CSS Rules

.leading-loose {
  line-height: 2;
}

Usage

<element class="leading-loose" />

Responsive

Prefix .leading-loose utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:leading-loose" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="leading-loose:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="leading-loose:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before leading-loose::before" />

<element class="content-after leading-loose::after" />
.leading-loose Sets line-height to loose preset.

leading-none

Sets line-height: 1.

CSS Rules

.leading-none {
  line-height: 1;
}

Usage

<element class="leading-none" />

Responsive

Prefix .leading-none utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:leading-none" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="leading-none:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="leading-none:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before leading-none::before" />

<element class="content-after leading-none::after" />
.leading-none Sets line-height: 1.

leading-normal

Sets line-height to normal preset.

CSS Rules

.leading-normal {
  line-height: 1.5;
}

Usage

<element class="leading-normal" />

Responsive

Prefix .leading-normal utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:leading-normal" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="leading-normal:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="leading-normal:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before leading-normal::before" />

<element class="content-after leading-normal::after" />
.leading-normal Sets line-height to normal preset.

leading-relaxed

Sets line-height to 1.625 for relaxed, airy text spacing.

CSS Rules

.leading-relaxed {
  line-height: 1.625;
}

Usage

<element class="leading-relaxed" />

Responsive

Prefix .leading-relaxed utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:leading-relaxed" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="leading-relaxed:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="leading-relaxed:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before leading-relaxed::before" />

<element class="content-after leading-relaxed::after" />
.leading-relaxed Sets line-height to 1.625 for relaxed, airy text spacing.

leading-snug

Sets line-height to 1.375 for snug, compact text spacing.

CSS Rules

.leading-snug {
  line-height: 1.375;
}

Usage

<element class="leading-snug" />

Responsive

Prefix .leading-snug utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:leading-snug" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="leading-snug:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="leading-snug:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before leading-snug::before" />

<element class="content-after leading-snug::after" />
.leading-snug Sets line-height to 1.375 for snug, compact text spacing.

leading-tight

Sets line-height to tight preset.

CSS Rules

.leading-tight {
  line-height: 1.25;
}

Usage

<element class="leading-tight" />

Responsive

Prefix .leading-tight utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:leading-tight" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="leading-tight:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="leading-tight:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before leading-tight::before" />

<element class="content-after leading-tight::after" />
.leading-tight Sets line-height to tight preset.