Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
[css-fonts] Handling of @font-face rule which lacks font-family or src descriptor #1133
Comments
upsuper
added
css-fonts-3
css-fonts-4
labels
Mar 28, 2017
upsuper
referenced this issue
in servo/servo
Mar 28, 2017
Closed
parse_font_face_block should not reject a @font-face rule when it lacks font-family or src #16165
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. |
|
litherum
added
the
Needs Edits
label
Jul 9, 2017
pushed a commit
that referenced
this issue
Jul 20, 2017
litherum
closed this
Jul 20, 2017
litherum
removed
the
Needs Edits
label
Jul 20, 2017
fantasai
added
the
Agenda+
label
Aug 2, 2017
|
This is a substantial change against a CR spec, so needs a WG resolution. |
fantasai
reopened this
Aug 2, 2017
|
Adding to F2F agenda, so removing Agenda+ |
litherum
removed
the
Agenda+
label
Aug 3, 2017
css-meeting-bot
commented
Aug 3, 2017
|
The CSS Working Group just discussed
The full IRC log of that discussion<fremy> Topic: font-face without src<astearns> github: https://github.com/w3c/csswg-drafts/issues/1133 <fremy> Github: https://github.com/w3c/csswg-drafts/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// |
upsuper commentedMar 28, 2017
The spec currently says:
It defines a
@font-facerule 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.