According to:
https://drafts.csswg.org/css-fonts-4/#family-name-syntax
The unquoted generic font-family names should not match @font-face nor existing font names.
As we add more generic families, and we changed the definition not to require to resolve to existing fonts, I wonder we may want to revisit this criteria too.
As the number of generic family increases, we'll increase the risk of snippets like this to behave differently by browsers:
@font-face { family-name: fangsong; ... }
html { font-family: fangsong; }
then browsers that supports fangsong generic family will ignore this @font-face.
In Blink, we apply this rule to system-ui, but haven't done so to other generic families yet.
According to:
https://drafts.csswg.org/css-fonts-4/#family-name-syntax
The unquoted generic font-family names should not match @font-face nor existing font names.
As we add more generic families, and we changed the definition not to require to resolve to existing fonts, I wonder we may want to revisit this criteria too.
As the number of generic family increases, we'll increase the risk of snippets like this to behave differently by browsers:
then browsers that supports
fangsonggeneric family will ignore this@font-face.In Blink, we apply this rule to
system-ui, but haven't done so to other generic families yet.