Skip to main content

require-format-hint

Require format(...) hints for url(...) entries in @font-face src.

Rule catalog ID: R005

Targeted pattern scopeโ€‹

  • src declarations inside @font-face.

What this rule reportsโ€‹

  • url(...) entries that do not include format(...).

Why this rule existsโ€‹

Format hints let browsers skip unsupported probes and improve source selection efficiency.

โŒ Incorrectโ€‹

@font-face {
src: url("./inter.woff2");
}

โœ… Correctโ€‹

@font-face {
src: url("./inter.woff2") format("woff2");
}

Further readingโ€‹