-
Notifications
You must be signed in to change notification settings - Fork 663
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
[css-fonts] Handling of @font-face rule which lacks font-family or src descriptor #1133
Comments
Pretty sure "invalid" things should be ignored, and "ignore" means the former. https://www.w3.org/TR/CSS2/conform.html#ignore
https://www.w3.org/TR/CSS21/syndata.html
https://drafts.csswg.org/css-syntax/
So the issue here is that implementation seems to be disagree with this part of the spec:
If such rules are not discarded at parse time, they are not considered "invalid" as the term is defined in CSS specifications. Maybe that last bit of quoted spec should be changed to align with implementations. |
👍 |
This is a substantial change against a CR spec, so needs a WG resolution. |
Adding to F2F agenda, so removing Agenda+ |
The CSS Working Group just discussed
The full IRC log of that discussion<fremy> Topic: font-face without src<astearns> github: https://github.com//issues/1133 <fremy> Github: https://github.com//issues/1133 <fremy> myles_: for a long time, at font face without src is ignored <fremy> myles_: which means it is a parse error and is not there anymore <fremy> dbaron: i would argue ignored could mean it's there in the om but then does nothing <fremy> myles_: ok, I think it doesn't matter for what I want to think about <fremy> myles_: in some cases, you can have font faces to alter font properties <fremy> myles_: and all browsers accept to do that <fremy> myles_: so I would like the text to be changed to say that the font face rule should not be used for font matching <fremy> myles_: but should apply otherwise <fremy> dbaron: i think that is the sensible way to "ignore" them <fremy> TabAtkins: I have a follow-up question about whether we should apply a similar reasoning to invalid counter styles <fremy> dbaron: it would make sense to me <fremy> myles_: I cannot say that this matches browsers in that case, i have not tested <fremy> TabAtkins: sounds good, but we could decide on a principle and update if needed <fremy> Alan: what is the proposition then? <fremy> myles_: (repeats previous proposal) <fremy> RESOLVED: font face rules should be in the om, apply for font settings, but should not be used for font matching <fremy> RESOLVED: font face rules should be in the om, but should not be used for font matching (correction of previous statement) <astearns> s/, apply for font settings// |
The spec currently says:
It defines a
@font-face
rule to be invalid if either font-family or src descriptor is missing, but it is not clear what does "ignore entirely" mean here. It could mean:Currently in all modern browsers, it is handled in the second approach (that is, invalid rules are NOT rejected by the parser), but the spec should really make it clear.
The text was updated successfully, but these errors were encountered: