Token reference Porchlight CSS

Typography

52 components 51 stable 1 experimental

Command

Search Porchlight

Typography Tokens

Porchlight uses a fluid type scale with clamp() so text smoothly scales between mobile and desktop without media queries.

Font stacks

TokenStack
--pl-font-sanssystem-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif
--pl-font-monoui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace

Type scale

Five steps. The clamp() ranges ensure minimum readability on small screens and comfortable scaling on large ones:

TokenMinMaxExample use
--pl-text-xs0.75rem (12px)0.8125rem (13px)Captions, labels, timestamps
--pl-text-sm0.875rem (14px)0.9375rem (15px)Body small, secondary text
--pl-text-md1rem (16px)1rem (16px)Body text (default)
--pl-text-lg1.125rem (18px)1.25rem (20px)Card titles, section headings
--pl-text-xl1.25rem (20px)1.625rem (26px)Page titles

The viewport-relative unit (vi) in the clamp() values means text scales with 1% of the viewport inline size, not the root font size.

Line height (leading)

TokenValueUsage
--pl-leading-tight1.2Headings, UI labels
--pl-leading-normal1.5Body text
--pl-leading-loose1.7Long-form prose

Text wrapping

These are applied globally, not as tokens:

PropertyValueUsage
text-wrap: balanceGlobalHeadings (H1-H4) distribute lines evenly
text-wrap: prettyGlobalParagraphs avoid orphan words on last line