Re: font-051/052/053/054/055/056 invalid (system font keywords are ok font families)

> On Friday 2010-10-15 21:12 +0000, Arron Eicholz wrote:
>> According to section 15.8  of the CSS 2.1 spec it clearly
>> identifies that the values for 'caption', 'icon', 'menu',
>> 'message-box', 'small-caption' and 'status-bar' cannot be mixed
>> with any other font values in the font shorthand. The shorthand
>> clearly identifies this restriction by using a single bar '|'
>> meaning 'or' and all the individual font properties are grouped by
>> the [ ]. This would mean 'font: 32pt caption' is not valid and
>> must be ignored.
>
> No, that's not what it means.
>
> It's just repeating what's already specified in the syntax, which is
> that you can have either the syntax:
>
>     [ <'font-style'> || <'font-variant'> || <'font-weight'> ]?
>     <'font-size'> [ / <'line-height'> ]? <'font-family'>
>
> or you can have one of the system font keywords.
>
> However, 'caption' is a perfectly valid value of <'font-family'>, so
> '32pt caption' matches the complex production given.
>
>> The cases are valid cases and no change needs to be made to the
>> cases from what I can see.
>
> They are not valid.
>
> On Friday 2010-10-15 14:16 -0700, "GĂ©rard Talbot" wrote:
>> Please verify again the spec.
>>
>> "
>> 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."
>> http://www.w3.org/TR/CSS21/about.html#property-defs
>
> Exactly.
>
> But the alternative being used in this case is the first
> alternative,
>
>     [ <'font-style'> || <'font-variant'> || <'font-weight'> ]?
>     <'font-size'> [ / <'line-height'> ]? <'font-family'>
>
> The value given contains a <'font-size'> and a <'font-family'>.
>
>
> On Friday 2010-10-15 14:26 -0700, "GĂ©rard Talbot" wrote:
>> "
>> 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.
>> "
>
> The test is not specifying a system font.  It's specifying a
> font-family for a font named 'caption'.
>
>> So, font: 32px caption;
>> is wrong and invalid. The parsing system would not know which font
>> size
>> to use: 8px (usually the default font size for caption) or 32px.
>
> The font-size for the caption system font isn't relevant, because
> this isn't specifying a system font.  It's specifying a font-family
> called 'caption'.


David,

I understand very well what you are saying. But there is definitely a
potential source of confusion.

"
Font family names that happen to be the same as a keyword value
('inherit', 'serif', 'sans-serif', 'monospace', 'fantasy', and
'cursive') must be quoted to prevent confusion with the keywords with
the same names.
"

But such escape mechanism does not apply to system font keywords:
caption, icon, menu, message-box, small-caption and status-bar. You're
saying it does not need to as it can be self-consistent here. Depending
on the declaration by itself, the CSS parsing should be able to figure
out if, say, caption is a system font reserved name or a font type name
correctly being declared and this, without caption being quoted.


>> >   font: initial;
>> >   font-size: 32px;
>> >   font-family: caption;
>>
>> No it's not.
>
> Yes, see above.
>
>> > and is perfectly valid.  The 'caption' in this case is NOT a system
>> > font keyword, but it's perfectly legal.
>>
>> To be a valid font-family and not a system font keyword, caption would
>> have to be quoted and should be quoted to indicate that it is not the
>> system font. There is a gap, a flaw in the spec wrt this.
>
> If you think it should have to be quoted, you're welcome to raise an
> issue with the spec, but the spec is consistent as it is today.

Ok. I will think about raising such issue.

I just removed those
font-051/052/053/054/055/056
testcases right now.

Revision version 1504

The .xht version of these testcases have been removed in my directory:

http://test.csswg.org/source/contributors/gtalbot/submitted/

The (orphanated, orphans) .htm version of those 6 testcases will be
removed during this night.

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

CSS 2.1 test suite (RC2; October 1st 2010):
http://test.csswg.org/suites/css2.1/20101001/html4/toc.html

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

Received on Friday, 15 October 2010 22:32:06 UTC