Paperbase Docs

PB_TYPOGRAPHY_OVERRIDE

An inline style attribute overrides Paperbase's editorial typography on a text element.

Severityinfo
Categorydesign
Agent-repairableYes

What happened

An inline style= on a text element sets a typography property (font-family, font-size, line-height, letter-spacing, or font-weight) that conflicts with Paperbase's editorial baseline.

When the override crosses a legibility floor (font-size < 10px, line-height < 1.2, or a heading smaller than body text) it also lowers the design-quality score.

How to fix

Use theme.body_font, theme.heading_font, or --paperbase-* CSS custom properties instead of inline styles on individual elements:

// Before — inline override on the element
// <h2 style="font-size: 8px; line-height: 1.0">Section</h2>
 
// After — use theme properties
theme: {
  body_font: "Inter",
  heading_font: "Fraunces",
}

Or use CSS custom properties for fine-grained control:

:root {
  --paperbase-heading-size: 1.5rem;
  --paperbase-body-line-height: 1.7;
}

Why this matters

Paperbase's editorial baseline is designed for print. Overriding typography properties at the element level often produces worse results than letting the baseline handle it. If you need a specific typographic treatment, express it through theme properties or CSS custom properties so the whole document stays consistent.

On this page