Skip to content

[css-fonts] Specify generic() versions of existing generic font families #10608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LeaVerou opened this issue Jul 21, 2024 · 0 comments
Open
Labels

Comments

@LeaVerou
Copy link
Member

Re: https://drafts.csswg.org/css-fonts/#generic-family-name-syntax

It appears we introduced a generic() syntax for new generic font families, but existing generic font families are still only specifiable using keywords.

Specifying them using generic() as well is not only more consistent and more readable, but it would also facilitate feature detection via @supports — which is currently impossible (this post recommends a JS method, but it doesn’t actually work).

Precedent: when we switched to a double colon for future pseudo-elements, we supported both syntaxes for existing pseudo-elements so that authors could eventually move towards that as a convention for all pseudo-elements. It’s the same here: we want authors to eventually move towards generic() for all generic font families.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant