Skip to main content

no-data-uri-src

Disallow data-URI font sources in @font-face.

Rule catalog ID: R010

Targeted pattern scopeโ€‹

  • url("data:...") entries in @font-face src.

What this rule reportsโ€‹

  • Any data URI source used for font files.

Why this rule existsโ€‹

Inlining fonts grows stylesheet size and delays parsing.

โŒ Incorrectโ€‹

@font-face {
src: url("data:font/woff2;base64,AAAA") format("woff2");
}

โœ… Correctโ€‹

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

Further readingโ€‹