w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.5k stars 661 forks source link

[css-font-loading] "Invalid" @font-face rules shouldn't create FontFace objects #1684

Open tabatkins opened 7 years ago

tabatkins commented 7 years ago

In https://github.com/w3c/csswg-drafts/issues/1133 we decided that an @font-face rule without its minimum required descriptors should be treated as valid (so it shows up in the OM), but just doesn't define a font face for the document.

Currently I generate CSS-connected FontFace objects for every @font-face rule, assuming that if they exist they're valid. I should instead tie it to whether they define a font face for the document, so those "invalid" @font-face rules don't define a FontFace.

litherum commented 7 years ago

Before modifying the spec, we should see what existing implementations do.

litherum commented 7 years ago

(I guess my removal of the "Needs Edits" label of another spec is a little antisocial, so I'll put it back. We still shouldn't modify the spec immediately, though.)