csstree / validator

CSS validator based on CSSTree
MIT License
65 stars 14 forks source link

[CSSTree] Unknown property `font-display` #17

Closed ghost closed 3 years ago

ghost commented 3 years ago

I am receiving this error message from the csstree vscode validator extension.

[CSSTree] Unknown property 'font-display'

For this code: font-display: swap;

https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display

ghost commented 3 years ago

the link says it's in 'working draft' but its well supported across browsers so shouldn't it be reconigized as valid by validator?

lahmatiy commented 3 years ago

That's because font-display is not a property but @font-face at-rule descriptor. With 2.0 validator now validate at-rules right, so it's not an issue anymore.