local-src-before-url
Require local(...) entries before url(...) entries in @font-face src.
Rule catalog ID: R006
Targeted pattern scopeโ
- Comma-separated source lists in
@font-facesrc.
What this rule reportsโ
- Lists where the first network URL appears before a local source.
Why this rule existsโ
Prioritizing local(...) avoids unnecessary requests when fonts are already installed.
โ Incorrectโ
@font-face {
src: url("./inter.woff2") format("woff2"), local("Inter");
}
โ Correctโ
@font-face {
src: local("Inter"), url("./inter.woff2") format("woff2");
}