- From: David Dorward <david@dorward.me.uk>
- Date: Thu, 25 Jan 2007 15:38:02 +0000
- To: James Diacono <jamesdiacono@optusnet.com.au>
- Cc: www-validator-css@w3.org
On Fri, Jan 26, 2007 at 12:35:43AM +1100, James Diacono wrote: > It seems the validator does not recognise the "inherit" value for the > shorthand font property. Yes it does. http://jigsaw.w3.org/css-validator/validator?text=body+%7B+font%3A+inherit%3B+%7D&usermedium=all&warning=1&profile=css21&usermedium=all > eg, for > > p,h1,h2,h6 { > font:normal normal normal 0.8em/1.3em inherit; > } This is invalid. From the specification: [ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar | inherit i.e. inherit OR status-bar OR small-caption OR message-box OR menu OR icon OR caption OR an optional font-style AND an optional font-farient AND an optional font-weight AND a font-size followed by an optional line-height AND a font-family. You can't specify style, varient, weird, size, line-height AND inherit. > I have tried validating it in both CSS2.1 and CSS3. > Also: I tried replacing 'inherit' with 'none' (which is not defined > at all) and it passed. "none" would be a font-family called "none". -- David Dorward http://dorward.me.uk
Received on Thursday, 25 January 2007 15:38:16 UTC