Skip to main content

no-duplicate-font-face

Disallow duplicate @font-face tuples for the same family/style/weight.

Rule catalog ID: R011

Targeted pattern scopeโ€‹

  • @font-face blocks grouped by family + style + weight.

What this rule reportsโ€‹

  • Duplicate tuples where two blocks describe the same face variant.

Why this rule existsโ€‹

Duplicate tuples create ambiguous source resolution and fragile maintenance.

โŒ Incorrectโ€‹

@font-face {
font-family: "Inter";
font-style: normal;
font-weight: 400;
src: url("./inter-a.woff2") format("woff2");
}

@font-face {
font-family: "Inter";
font-style: normal;
font-weight: 400;
src: url("./inter-b.woff2") format("woff2");
}

โœ… Correctโ€‹

@font-face {
font-family: "Inter";
font-style: normal;
font-weight: 400;
src: url("./inter-regular.woff2") format("woff2");
}

Further readingโ€‹