Re: [csswg-drafts] [css-fonts] is it allowed for generic families like system-ui to be overridden by @font-face? (#4580)

> Should you be able to (deliberately) override generic family keywords using @font-face?

No

> This is the part that I feel is not clear in the draft.

The @font-face `font-family` descriptor defines a “font family name” see https://www.w3.org/TR/css-fonts-3/#font-family-desc . The `font-family` property can select either font family names or generic  family keywords, as define din https://www.w3.org/TR/css-fonts-3/#font-family-prop . Font family names are selected using the `<family-name>` part of the `font-family` property, not the `<generic-family>` part, which selects generic family keywords.

The `font-family` property is clear that any unquoted ident matching a `<generic-family>` keyword represents that generic family, not a font family name. The fact that `<family-name>` strings can be unquoted is a historical artifact, they are fundamentally strings as noted in the Computed value line.

> Consider the following use case:

Some UAs (e.g. Firefox) allow the user to choose what font maps to the generic keywords. If you want that functionality in your UA and it doesn't provide it, file a bug.

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4580#issuecomment-565217534 using your GitHub account

Received on Thursday, 12 December 2019 22:34:56 UTC