Bug 16848 - {font-family: inherit foo;} is parsed and reported as invalid
{font-family: inherit foo;} is parsed and reported as invalid
Status: RESOLVED FIXED
Product: CSSValidator
Classification: Unclassified
Component: CSS 2.1
CSS Validator
PC All
: P2 normal
: ---
Assigned To: This bug has no owner yet - up for the taking
qa-dev tracking
http://jigsaw.w3.org/css-validator/va...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-25 00:22 UTC by Gérard Talbot
Modified: 2012-08-29 10:50 UTC (History)
1 user (show)

See Also:


Attachments

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
------------

http://jigsaw.w3.org/css-validator/validator?uri=http://www.gtalbot.org/BrowserBugsSection/css21testsuite/font-family-inherit-foo.html&warning=2&profile=css21&usermedium=all


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.
"
http://www.w3.org/TR/CSS21/fonts.html#font-family-prop



Additional notes
----------------

1-
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"
http://lists.w3.org/Archives/Public/www-style/2012Apr/0662.html

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

Gérard
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:

http://lists.w3.org/Archives/Public/www-style/2012May/0200.html

http://lists.w3.org/Archives/Public/www-style/2012May/0160.html
Comment 3 Gérard Talbot 2012-05-27 05:21:08 UTC
"
'foo inherit' and 'inherit foo' are valid unquoted font family names.
"

http://lists.w3.org/Archives/Public/www-style/2012May/0878.html

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."