This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12428 - Unquoted font-family name Hawaii 5-0 is reported valid by validator and not parsed+reported as invalid
Summary: Unquoted font-family name Hawaii 5-0 is reported valid by validator and not p...
Status: RESOLVED FIXED
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: CSS 2.1 (show other bugs)
Version: CSS Validator
Hardware: All 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...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-05 23:57 UTC by Gérard Talbot
Modified: 2012-09-21 14:37 UTC (History)
1 user (show)

See Also:


Attachments

Description Gérard Talbot 2011-04-05 23:57:30 UTC
Testcase
--------

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/Hawaii5-0-example.html



Relevant chunk of code
----------------------
h1 {font-family: Hawaii 5-0, sans-serif;}



Relevant chunk of spec
----------------------

"
    Font family names must either be given quoted as strings, or unquoted as a sequence of one or more identifiers. This means most punctuation characters and digits at the start of each token must be escaped in unquoted font family names.

    (...)

    For example, the following declarations are invalid:

    (...)

    font-family: Hawaii 5-0, sans-serif;

"
CSS 2.1, section 15.3 Font-family
http://www.w3.org/TR/CSS21/fonts.html#font-family-prop

"
In CSS, identifiers (...) cannot start with a digit
"
CSS 2.1, section 4.1.3 Characters and case
http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier



Url of validation (step to reproduce)
-------------------------------------

http://jigsaw.w3.org/css-validator/validator?uri=http://www.gtalbot.org/BrowserBugsSection/css21testsuite/Hawaii5-0-example.html&warning=2&profile=css21&usermedium=all


Actual results
--------------
- The CSS validator does not report such font-family declaration as invalid
- The CSS validator **removes** the hyphen (between 5 and 0) in its Valid CSS report.



Expected results
----------------

The CSS validator reports that the unquoted Hawaii 5-0 is invalid and explains appropriately that it is because each identifiers must not start with a digit. Or something like that.

regards, Gérard
Comment 1 Gérard Talbot 2012-03-17 23:47:09 UTC
Another example for this bug report:

div {font-family: Courier 10 Pitch;}

is not valid and not correct as one of the identifiers starts with a
digit. The CSS validator does not report a validation error with such declaration when it should.

Gérard
Comment 2 Gérard Talbot 2012-09-02 17:03:45 UTC
This appears to have been fixed.
The CSS validator now reports:

27 h1 Value Error : font-family 5 is not a font-family value : Hawaii 5 0,sans-serif 

Gérard