-
Notifications
You must be signed in to change notification settings - Fork 271
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
font-display:swap - Error. But it`s supported almost all browsers #649
Comments
Can you please post a short CSS stylesheet snippet here that uses I would like to add support for |
@font-face { |
Main problem of it: 100/100 rating by Google and faster load top of page. |
I understand and agree that support for |
This change is a hack to work around the fact the CSS-checking backend doesn’t yet have support for recognizing the CSS font-display descriptor. So rather that continuing to emit an error message for it (which is wrong, because it’s not an error...) this change causes the checker to filter out (drop/ignore/suppress) error messages about it. Addresses #649
I’ve made an interim change to the checker — and pushed it to https://validator.w3.org/nu/ — that causes it to filter out (drop/ignore/suppress) the *Property |
Fixed in w3c/css-validator@52af757 , 62c4bf2 should be reverted. |
Is this already live? I get some errors with font-display:swap (look at https://validator.w3.org/nu/?doc=https%3A%2F%2Fvielhuber.de%2F). |
It is, in your case, you have one instance that is not in a @font-face rule. |
You are absolutely right, thanks for clarification. Now I only get one error left, that scrollbar-color is unknown. May I open a github issue for this or is this intentionally that you only accept styles that are not in working draft anymore (https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color)? |
Here's an example that triggers this issue: <!DOCTYPE html>
<html lang="">
<head>
<title>Test</title>
<style>
body{ font-family:Roboto; font-size:15px; font-display:swap;}
</style>
</head>
<body>
<p></p>
</body>
</html> It looks like there's good support for it, and documentation in MDN about this property:
Should it still be marked as an issue? |
That example isn’t valid, so it’s appropriate for the checker to report an error there.
https://drafts.csswg.org/css-fonts-4/#font-display-desc So what would be valid instead is something like this: @font-face { font-family:Roboto; font-size:15px; font-display:swap; } The checker won’t report any error for that. |
Message: Property font-display doesn't exist.
font-display have good support: https://caniuse.com/#search=font-display
The text was updated successfully, but these errors were encountered: