Skip to content
Foundations

Typography

A fluid type scale, balanced headings, pretty paragraph wrapping, and modern font features.

Type scale

Sizes are defined as static rems and as fluid clamp() values for responsive headings.

TokenValueUsage
--b-text-2xs0.6875remSmall labels, kbd
--b-text-xs0.75remCaptions, badges
--b-text-sm0.875remHelp text, table cells
--b-text-md1remBody
--b-text-lg1.125remLead text
--b-text-xl1.25remSub-headings
--b-text-2xl1.5remh3
--b-text-3xl1.875remh2
--b-text-4xl2.25remh1
--b-text-5xl3remHero

Fluid sizes:

TokenRange
--b-fluid-h12rem → 3.75rem
--b-fluid-h21.625rem → 2.75rem
--b-fluid-h31.25rem → 1.875rem
--b-fluid-lead1.0625rem → 1.25rem

Headings

<h1><h6> are styled with fluid sizes and text-wrap: balance for nice multi-line headlines:

Display heading

Section heading

Subsection heading

h4 heading

Body text

Paragraphs use text-wrap: pretty for better orphan/widow handling.

html
<p>BlastCSS automatically prevents orphan words on the last line of a paragraph.</p>

Weights

TokenValue
--b-weight-normal400
--b-weight-medium530
--b-weight-semi620
--b-weight-bold720
--b-weight-black820

Use as utility classes: .font-normal, .font-medium, .font-semi, .font-bold, .font-black.

Code, kbd, mark

Inline code uses the mono stack. Press ⌘K to search. Some marked text is highlighted.

Pretty/Balance utilities

Use .text-balance on headlines for symmetric multi-line wrapping.

Use .text-pretty on body text to avoid widows.

Use .truncate for ellipsis on overflow lines

Font stacks

Tokens default to:

css
--b-font-sans: "Inter var", Inter, ui-sans-serif, system-ui, sans-serif;
--b-font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", monospace;
--b-font-display: var(--b-font-sans);

Override with brand fonts:

css
:root {
  --b-font-sans: "Geist", system-ui, sans-serif;
  --b-font-display: "GT Sectra", "Times New Roman", serif;
}
Edit this page