Bug 16848 - {font-family: inherit foo;} is parsed and reported as invalid
Summary: {font-family: inherit foo;} is parsed and reported as invalid
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: CSS 2.1 (show other bugs)
Version: CSS Validator
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL: http://jigsaw.w3.org/css-validator/va...
Depends on:
Reported: 2012-04-25 00:22 UTC by Gérard Talbot
Modified: 2012-08-29 10:50 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Gérard Talbot 2012-04-25 00:22:52 UTC
URL for Test


Actual result
CSS validator reports this validation error message:
Value Error : font-family Too many values or values are not recognized : inherit foo 

Expected result
inherit foo should be treated as an unquoted font name with one blank white space which should be parsed as "inherit foo"
If a sequence of identifiers is given as a font family name, the computed value is the name converted to a string by joining all the identifiers in the sequence by single spaces.

Additional notes

div {font-family: foo inherit;}
is parsed and reported as valid by the CSS validator.

2- This edge case has been discussed in the thread
[css21] 'font-family' should disallow 'inherit' in font names more strictly"

3- Credits must go to Kang-Hao (Kenny) Lu for discovering this

Comment 1 Tab Atkins Jr. 2012-04-26 01:06:59 UTC
Given that there is active discussion about changing this behavior to clarify that it's invalid, I think this bug should be WONTFIX for now.  It can be reopened if we agree that this is a valid case.
Comment 2 Gérard Talbot 2012-05-07 04:32:17 UTC
Resolving as WONTFIX now that things have been sufficiently clarified

More info:


Comment 3 Gérard Talbot 2012-05-27 05:21:08 UTC
'foo inherit' and 'inherit foo' are valid unquoted font family names.


Therefore, REOPENING
Comment 4 Yves Lafon 2012-08-29 10:50:14 UTC
Fixed, the test case now reports the following warning:

"Family names containing whitespace should be quoted. If quoting is omitted, any whitespace characters before and after the name are ignored and any sequence of whitespace characters inside the name is converted to a single space."