Skip to main content

require-system-font-fallback

Require font-family stacks to end with a system fallback.

Rule catalog ID: R015

Targeted pattern scopeโ€‹

  • font-family declarations outside @font-face.

What this rule reportsโ€‹

  • Stacks that do not end with a system fallback name such as system-ui.

Why this rule existsโ€‹

Explicit system fallback improves resiliency when custom fonts fail.

โŒ Incorrectโ€‹

.title {
font-family: "Inter", Arial;
}

โœ… Correctโ€‹

.title {
font-family: "Inter", system-ui;
}

Further readingโ€‹