


From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Tue, 22 Nov 2005 19:43:17 -0800
Message-ID: <007001c5efe0$0ab95cc0$3201a8c0@Terra>
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: <www-style@w3.org>

----- Original Message ----- 
From: "Boris Zbarsky" <bzbarsky@mit.edu>
To: "Andrew Fedoniouk" <news@terrainformatica.com>
Cc: <www-style@w3.org>
Sent: Tuesday, November 22, 2005 6:13 PM
Subject: Re: [CSS21] Status of defult (intrinsic) style sheet in UA

> Andrew Fedoniouk wrote:
>> All the more. Why we need this: "Style sheets from these three origins 
>> will overlap
>> in scope, and they interact according to the cascade." [1] then?
> Because the di?
>> Why do they need to interact?
> Because you have to know what to do if all three (UA, user, author) 
> specify values for a property.

Again how then they related to each other?

Let's say we have element with initially empty style.

Then sequence of style resolving actions will be

1) Apply UA default styles.
2) Apply author and user styles.

#2 will unconditionally override values of #1.

Why do we need to put them in one table?
Anyway order of style definitions in this table
is not clear:

See, here is the spec


1. Sort by importance (normal or important) and origin (author, user, or 
user agent). In ascending order:

   1) user agent style sheets
   2) user normal style sheets
   3) author normal style sheets
   4) author important style sheets
   5) user important style sheets

2. Sort by specificity of selector: more specific selectors will override 
elements and classes, respectively.


<UA style>
ul li li { margin:0; }

<Author style>
ul li { margin:1px; }

... according to cascading rule
"more specific selectors will override more general ones."
UA rule will override Author style for second li:

And more:

If we need all five style systems behave as one table
then why just not to add into
one more "digit" into "a-b-c-d" ?

For example:


Where the source has values:

   0 - user agent style sheets
   1 - user normal style sheets
   2 - author normal style sheets
   3 - author important style sheets
   4 - user important style sheets

And forget about
[ http://www.w3.org/TR/CSS21/cascade.html#cascading-order ]
in the whole?

>> What does "interaction" mean here?
> Determination of the cascaded value of a property.
>> It is two (or probably three) independent style systems applied 
>> consequently.
> It's not obvious to me what this means.
>> If we will consider them this way we don't even need !important.
> Nor this.

Ok. I *suspect* that spec is trying to say following:

There are five layers (style systems).
Style definitions in these layers ordered by specificity local to the layer.
So styles in these layers are independent from other styles in other layers.

For any given element styles from each layer consequently
override values from previous layer.

If this is really what spec is trying to explain then I think
it should be reformulated.

Andrew Fedoniouk.
Received on Wednesday, 23 November 2005 03:43:32 GMT
