consistent-font-display
Require one font-display strategy per stylesheet.
Rule catalog ID: R012
Targeted pattern scopeโ
- All
font-displaydeclarations inside@font-faceblocks.
What this rule reportsโ
- Files that mix display values such as
swapandfallback.
Why this rule existsโ
Mixed strategies make perceived loading behavior inconsistent across fonts in the same page.
โ Incorrectโ
@font-face {
font-family: "Inter";
font-display: swap;
}
@font-face {
font-family: "Inter";
font-display: fallback;
}
โ Correctโ
@font-face {
font-family: "Inter";
font-display: swap;
}
@font-face {
font-family: "Inter";
font-display: swap;
}