Issue metadata
Sign in to add a comment
|
CSS.supports() not working for font-display
Reported by
superpoi...@gmail.com,
Apr 2 2016
|
||||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36
Steps to reproduce the problem:
1. Turn on experimental web-platform features in Canary
2. Open Developer Tools Console
3. type CSS.supports("font-display", "swap"); and enter
What is the expected behavior?
Should have displayed true. In my tests font-display works but not feature detection using CSS.supports()
What went wrong?
CSS.supports() showing false
Did this work before? N/A
Chrome version: 51.0.2697.0 Channel: stable
OS Version: 6.2 (Windows 8)
Flash Version: Shockwave Flash 21.0 r0
Feature works, feature-detection via javascript isn't
,
Apr 6 2016
Confirmed, as best I can tell. I'm on Linux, in Chrome unstable with experimental web platform features enabled. http://output.jsbin.com/nigahi/latest/quiet shows different fonts for the five lines but CSS.supports("font-display", "swap"); returns false. Assigning to ksakamoto as owner listed at https://www.chromestatus.com/feature/4799947908055040.
,
Apr 6 2016
This is actually working as intended. font-display is a descriptor, not a property, and CSS.supports is only for properties (there is both a font-family descriptor and font-family property so it works in CSS.supports). https://drafts.csswg.org/css-conditional-3/#the-css-interface https://tabatkins.github.io/specs/css-font-display/#font-display-desc
,
Apr 11 2016
Thanks. If CSS.supports won't do feature detection, what else does it? There may be cases where it's useful. For example, if the browser supports font-display I'd use the browser's feature. Else I'll run fontfaceobserver which can be made to behave like font-display.
,
Apr 21 2016
Should `font-display` be exposed in the CSS Font Loading API? I filed an issue at tab’s github but I think maybe I should file it here: https://github.com/tabatkins/specs/issues/54
,
Jul 27 2017
I think we should reopen this. Is there a practical reason why CSS.supports and @supports shouldn’t work with descriptors? |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by cbiesin...@chromium.org
, Apr 5 2016