W3C home > Mailing lists > Public > www-validator-css@w3.org > August 2005

Re: arial isn't allowed?

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Mon, 15 Aug 2005 12:00:01 +0300 (EEST)
To: ReVaDeBe <revadebe@revadebe.nl>
Cc: www-validator-css@w3.org
Message-ID: <Pine.GSO.4.63.0508151145400.162@korppi.cs.tut.fi>
On Sun, 14 Aug 2005, ReVaDeBe wrote:

> when I try to validate my CSS-file, the validator says " font-family : arial, sans-serif;" isn't good CSS.
> "It contains too many (unknown) values".
> But when I delete 'arial, ' it is OK.
> So the 'unknown value' is arial, but this is a standard font...

Since a very similar problem was just reported by Michal Dlouhý on this 
list, with a description of how to reproduce the problem, it seems that 
the URL I asked for in my previous reply isn't needed in this case.

Apparently you, too, have encountered the "validator's" new (?) feature of 
checking font names against some list of names _when in "CSS Version 3" 
mode. Well, in some cases at least. If you have just
   body { font-family: arial; }
then the "validator" issues a (questionable) warning
   You are encouraged to offer a generic family as a last alternative
but if you use
   body { font-family: arial, sans-serif; }
then you get an _error_ message as quoted above!

If you capitalize the font name, writing Arial instead of arial, the 
problem disappears, apparently because Arial is in the list that the 
"validator" uses and arial is not. In principle, font names are case 
sensitive, and they are usually capitalized. Therefore you could actually 
fix arial to Arial, but this doesn't make the "validator's" behavior 
correct.

(It might be useful if a CSS checker checked font names against some list 
of commonly used fonts and issued a _warning_ if a name appearing in a 
style sheet differs so little from a name in the list that it is probably 
a misspelled font name, such as arial or Ariel. But reporting all font 
names outside the list as errors is a gross error.)

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Monday, 15 August 2005 09:01:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:16 GMT