Malevich

Primitives/

Typography

Role-based typography utility classes + adjacent-selector defaults.

Typography

CSS utility classes and adjacent-selector defaults for the role-based typography system. Per ADR-0009.

Two surfaces:

  1. Utility classes — apply a typography role to any element: <h1 class="font-display-hero">…</h1>.
  2. Adjacent-selector defaults — inside <main> and <article>, h1h4, p, small, figcaption adopt sensible default roles automatically so authors writing standard HTML get correct typography without classes.

Classes

Display group (fluid display sizes per ADR-0009)

Class Role Approx
.font-display-hero Landing hero 72px
.font-display-statement Section-level statement 48px
.font-display-title Page title emphasis 32px

Heading group (in-document)

Class Role Tag default
.font-heading-title H1 inside article main h1, article h1
.font-heading-section H2 inside article main h2, article h2
.font-heading-subsection H3 inside article main h3, article h3
.font-heading-group H4 inside article main h4, article h4

Body group

Class Role Tag default
.font-body-lead Lead paragraph main p.lead
.font-body-regular Standard body copy main p
.font-body-support Supporting text
.font-body-caption Small annotations main small, main figcaption

Special

Class Role
.font-overline Eyebrows / labels (UPPERCASE)
.font-mono Inline / block monospace

Anatomy

<!-- Default in-document typography (no classes needed) -->
<main>
  <h1>Page title</h1>
  <p class="lead">A lead paragraph stands out.</p>
  <p>Standard body copy.</p>
  <h2>Section heading</h2>
  <p>More body copy. <small>A footnote.</small></p>
</main>

<!-- Override default to display-hero for landings -->
<main>
  <h1 class="font-display-hero">A semantic design system.</h1>
  <p class="font-body-lead">For humans and AI agents.</p>
</main>

<!-- Overline above a title -->
<div>
  <span class="font-overline">v1.0 launch</span>
  <h1 class="font-display-statement">Bigger ideas.</h1>
</div>

Tokens used

All font-{role}-* semantic tokens. See ADR-0009 for the full role inventory.

Accessibility

Do

Don't