W3C home > Mailing lists > Public > www-validator-css@w3.org > May 2012

Font shorthand not validating

From: Jay Cornell <jay.cornell@gmail.com>
Date: Thu, 3 May 2012 14:25:13 -0700
Message-Id: <01C9EDBD-95DE-477A-980A-07AC2246D923@gmail.com>
To: www-validator-css@w3.org
I have used the validator for years, but suddenly standard font  
declaration shorthand is not validating, apparently because of the  
slash between the font-size and line-height. Thus this code:

p { font: 11px/14px Arial, Helvetica, sans-serif; }


gives this error:

Value Error : font / is not a font-family value : 11px / 14px  
Arial,Helvetica,sans-serif


But without the slash and the line-height value it validates:

p { font: 11px Arial, Helvetica, sans-serif; }


Even the W3C's own first example here gives the same validation error!

http://www.w3.org/TR/CSS2/fonts.html#font-shorthand

p { font: 12px/14px sans-serif }



Thank you,

--Jay Cornell
Received on Sunday, 6 May 2012 05:25:07 GMT

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