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 8529 - A system font value cannot mix with another subproperty value when declaring a font shorthand
Summary: A system font value cannot mix with another subproperty value when declaring ...
Status: RESOLVED INVALID
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: 2009-12-21 03:27 UTC by Gérard Talbot
Modified: 2010-10-15 22:28 UTC (History)
1 user (show)

See Also:


Attachments

Description Gérard Talbot 2009-12-21 03:27:04 UTC
URL: 
http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.gtalbot.org%2FStylesheets%2Ffont-shorthand-system-font-validator-bug.css&profile=css21&usermedium=all&warning=2&lang=en


The following rules should all be parsed by CSS validator as illegal, as invalid declarations:

span {font: 32px caption;} 

span {font: 32px icon;} 

span {font: 32px menu;} 

span {font: 32px message-box;} 

span {font: 32px small-caption;} 

span {font: 32px status-bar;} 

References and relevant excerpts
--------------------------------

Section 1.4.2.1 states:
"
A bar (|) separates two or more alternatives: exactly one of them must occur. 
"
http://www.w3.org/TR/CSS21/about.html#value-defs


Section 15.8 states:
"
'font'
    Value:  	[ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar | inherit

(...)

System fonts may only be set as a whole; that is, the font family, size, weight, style, etc. are all set at the same time. These values may then be altered individually if desired.
"

What that means is

span {font: 32px caption;}

is invalid while, on the other hand,

span {font: caption;}

span {font-size: 32px;}

would be valid and would make the font-size of the span element alterable, modifiable, settable in such code.

System font reserved values (caption, icon, menu, message-box, small-caption, status-bar) should appear alone without any other font subproperties. Otherwise the syntax provided for the set of values is wrong.

regards, Gérard
Comment 1 L. David Baron (Mozilla) 2010-10-15 22:28:59 UTC
This bug is invalid; these values are legal.  For an explanation, see http://lists.w3.org/Archives/Public/public-css-testsuite/2010Oct/0179.html