W3C home > Mailing lists > Public > www-style@w3.org > February 2004

Re: [CSS21] response to issue 82

From: fantasai <fantasai@escape.com>
Date: Fri, 20 Feb 2004 23:21:51 -0500
Message-ID: <4036DCDF.4070504@escape.com>
To: Bert Bos <bert@w3.org>, www-style@w3.org

Bert Bos wrote:
> fantasai writes:
> 
>>Bert Bos wrote:
>>
>>>Your e-mail:
>>>    http://www.w3.org/mid/3F875337.6080406@escape.com
>>>    Default Attributes
>>>    S5.8.2 <http://www.w3.org/TR/2003/WD-CSS21-20030915/selector.html#q11>
>>>    #    EXAMPLE { /*... default property settings ...*/ }
>>>    # Because this selector is less specific than an attribute selector,
>>>    # it will only be used for the default case.
>>>    This is false. The selector will be used for all cases, not just the
>>>    default case. If a declaration from this rule conflicts with one from
>>>    a more specific rule, then it will be overridden--but the declaration
>>>    still applies.
>>>
>>>CSS WG response:
>>>    It's only an example and is accurate enough, we think.
>>
>>It's not accurate at all ...
<snipped response and rewrite>
> 
> I think I'm starting to see what you mean. It's not about whether the
> selector matches. It's about the word "default." You interpret the
> comment "default property settings" different from how we intended it:
> 
>   - Your meaning is that these are the *default properties* that apply
>     to all EXAMPLE elements, independent of what attribute the element
>     has.
> 
>   - Our meaning is that those are the properties that apply to the
>     EXAMPLE element when its attribute has the value that is declared
>     as the *default value* in the DTD.

Not at all. I interpreted the comment just as you meant it. The sentence
below it states your intent very clearly. My problem is that the comment
as you meant it (and thus that sentence) is /wrong/ because the selector
matches all EXAMPLE elements, not just ones with the default attribute
setting.

Here's the spec:

     #    EXAMPLE { /*... default property settings ...*/ }
     # Because this selector is less specific than an attribute selector,
     # it will only be used for the default case.
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> When you said: "If a declaration from this rule conflicts with one
> from a more specific rule, then it will be overridden," we thought
> that was a rather subtle way of saying it. *Of course* the
> declarations will be overridden: the rule that overrides them is right
> there in the example. Why use the word "if"?

Because the second rule may contain only declarations for properties
not declared in the first?

EXAMPLE { border: solid }
EXAMPLE[notation=octal] { background: silver }

Note that, contrary to the sentence I quoted, <example notation=octal>
will have a solid border.

~fantasai
Received on Friday, 20 February 2004 23:23:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:26 GMT