function

Font format() — CSS reference

Tests whether the engine can use a font format. It does not test whether a particular font resource exists or downloads. Keep the unconditioned declaration as a fallback.

Formal Syntax & Structure

css syntaxcss
@supports font-format(woff2) { #a { color: blue; } }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>font-format()</title><style>body{margin:8px;font:16px/20px sans-serif;color:black;background:white}#a{color:green}@supports font-format(woff2){#a{color:blue}}</style><body><p id="a">Example text</p></body></html>
CSS Reference