[RC5, pre-RC6] font-systemfont-rule-003 inaccurate/incorrect

Arron,

http://test.csswg.org/suites/css2.1/20110111/html4/font-systemfont-rule-003.htm
(RC5)

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/font-systemfont-rule-003.htm

http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_15/font-systemfont-rule-003.htm

http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_15/font-systemfont-rule-003.xht


Relevant code is:
#test
            {
                font: UnknownFont;
            }

Font shorthand requires at minimum 2 font subproperties (unless
resorting to a system font): font-size and font-family.

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

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


"
    * A bar (|) separates two or more alternatives: exactly one of them
must occur.
    * A double bar (||) separates two or more options: one or more of
them must occur, in any order.
    * Brackets ([ ]) are for grouping.
    * A question mark (?) indicates that the preceding type, word, or
group is optional.
"
http://www.w3.org/TR/CSS21/about.html#value-defs


Otherwise the declaration is treated as invalid:


http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Ftest.csswg.org%2Fsuites%2Fcss2.1%2F20110111%2Fhtml4%2Ffont-systemfont-rule-003.htm

So, the user agent should not even attempt to fetch UnknownFont. The
test may actually end up doing what the testcase assertion predict but,
in all fairness, for the wrong reasons: invalid font shorthand
declaration.

Proposed modification:

line 10:    #test
line 11:    {
line 12:    font: 16px UnknownFont;
line 13:    }

---------

One other detail about the testcase. Everywhere it says "font unknown",
I would be tempted to replace it with "not installed font" as a better
and more precise description. A font may be known but not fetchable by
the os, not retrievable by the os for some reasons[1] or, ultimately,
not installed on the os.

[1] Under Linux KDE, it is possible to disable a font without
uninstalling it.

regards, Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 test suite (RC5; January 11th 2011):
http://test.csswg.org/suites/css2.1/20110111/html4/toc.html

CSS 2.1 test suite contributors:
http://test.csswg.org/source/contributors/

Received on Wednesday, 23 March 2011 16:53:38 UTC