Closed Bug 748683 Opened 13 years ago Closed 12 years ago

font-family lists that include keywords are not always flagged as invalid

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jtd, Assigned: jtd)

References

Details

Attachments

(1 file)

This will cause a parse error: font-family: inherit, sans-serif; This won't: font-family: sans-serif, initial; Both should cause a parse error. See discussion here: http://lists.w3.org/Archives/Public/www-style/2012Apr/0638.html Same should be true for the reserved keywords 'default' and 'initial'.
Hmm, this is even trickier than I thought. The spec only disallows unquoted use of 'inherit', 'default', etc. when they match a complete name, there's nothing that requires quoting within a family name formed from multiple space-separated idents. font-family: inherit sans-serif, cursive; Firefox: invalid Chrome: invalid font-family: sans-serif inherit, cursive; Firefox: parses Chrome: invalid Substitute 'initial' for inherit and Chrome treats both rules as invalid. But substitute 'default' and both rules parse. Firefox parses all of these.
Depends on: 280443
Attachment #618184 - Attachment mime type: text/plain → text/html
Note: the patch on bug 605231 should also fix this bug.
Depends on: 605231
No longer depends on: 280443
Verified fixed by bug 605231. Tested with: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20130117 Firefox/21.0
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: