sdxc

Type to search, or start from one of these:

typography

line-height

Applies line-height.

import { leading } from "@sdxc/u/typography";

Quick reference

Every documented call, beside the CSS it emits.

CallCSS
u.leading("relaxed")css({ lineHeight: "var(--ui-leading-relaxed, 1.625)" })
u.leading(1.8)css({ lineHeight: 1.8 })
u.leading("2rem")css({ lineHeight: "2rem" })

Using a custom value

Every scale argument also takes a raw CSS value, which passes through untouched.

u.leading("relaxed")

Applying on a state

Wrap the call in a state utility to scope it to one selector.

u.hover(u.leading("relaxed"))

Responsive design

Wrap the call in a container query to scope it to one width.

u.at("md", u.leading("relaxed"))

Customizing the theme

The custom properties this utility reads, which a theme redefines.

Variable
--ui-leading-
--ui-leading-relaxed

Signature

u.leading(value?: LeadingValue)