Skip to content

[css-fonts-4] [varfont] Feature queries? #1274

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

Closed
davelab6 opened this issue Apr 21, 2017 · 2 comments
Closed

[css-fonts-4] [varfont] Feature queries? #1274

davelab6 opened this issue Apr 21, 2017 · 2 comments
Labels
css-fonts-4 Current Work

Comments

@davelab6
Copy link
Contributor

davelab6 commented Apr 21, 2017

Should we have a feature query for variable fonts?

(reference https://hacks.mozilla.org/2016/08/using-feature-queries-in-css/)

@supports (font-variation-settings: "opsz" 14) {
   // code that will only run if variable fonts are supported by the browser 
 }

Pondering:

@supports (font-variation-settings: "XOPQ" 14) {
   // what happens here? :) 
 }

This idea came from a chat with @jensimmons at the www.snd.org conference :)

@litherum
Copy link
Contributor

https://drafts.csswg.org/css-conditional-3/#at-supports says:

The @supports rule is a conditional group rule whose condition tests whether the user agent supports CSS property:value pairs.

In this situation, the user agent does support that property:value pair. (It's the font that doesn't.) So, both the cases have the same semantic meaning.

If you're trying to figure out if a font supports a particular feature, @supports isn't what you want, since there's no way to match it up with a particular font file. Instead, you want #520

@litherum litherum added the css-fonts-4 Current Work label Apr 22, 2017
@litherum
Copy link
Contributor

litherum commented Mar 6, 2018

duplicate of #520

@litherum litherum closed this as completed Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-fonts-4 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants