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...
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...
Depends on:
Reported: 2011-04-05 23:57 UTC by Gérard Talbot
Modified: 2012-09-21 14:37 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 2011-04-05 23:57:30 UTC


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

In CSS, identifiers (...) cannot start with a digit
CSS 2.1, section 4.1.3 Characters and case

Url of validation (step to reproduce)


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.

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