-
Notifications
You must be signed in to change notification settings - Fork 711
[css-fonts-4] [varfont] Variation fonts deserve their own @-rules #522
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
Comments
Migrated on behalf of @jpamental: I wonder if we could actually leverage
This extends the ideas I was trying to articulate here: #450 but seems to dovetail nicely with this approach. |
@jpamental, that seems problematic because it restricts each font to one font stack. For example, if you used different sans-serif fonts in body and heading, you'd probably want different adjustments for the same "generic" fallback font that you'd put in both stacks. |
@jfkthame and I had originally come up with @font-family as well, for similar reasons. |
Do we still want to pursue this? The last comment was over a year ago. |
Now that we have shipping browser implementations and sites that use the current syntax I feel that changing the syntax at this point isn't a good move. I'm fine with closing this issue. |
Migrated on behalf of @bramstein:
I'm a little worried this is overloading the @font-face syntax too much. Families are created using multiple @font-face rules, one for each "instance". A variation font already contains all variations, so it doesn't map very cleanly to @font-face. The new format hints and range proposals feel a little off to me for that reason.
I know this would be a substantial change, but would it be possible to define a new @ rule for variation fonts? Something like this:
This avoids extending the format hints and overloading the @font-face descriptors. As @nattokirai pointed out, most uses of variation fonts won't need weight, style, and stretch descriptors.
This would fall back to the two @font-face rules in browsers that do not support font variations. Browsers that support font variations would ignore the @font-face rules and use the @font-variation rule for everything.
The text was updated successfully, but these errors were encountered: