W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2019

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

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Thu, 12 Dec 2019 22:34:54 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-565217534-1576190093-sysbot+gh@w3.org>
> 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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:57 UTC