W3C home > Mailing lists > Public > www-style@w3.org > September 2009

Re: Some confusing bits and pieces...

From: Emanuele D'Arrigo <manu3d@gmail.com>
Date: Tue, 29 Sep 2009 11:14:31 +0100
Message-ID: <915dc91d0909290314rb17b3c5v305c9c3f2865204b@mail.gmail.com>
To: www-style@w3.org
Giovanni, thank you for your reply!

2009/9/24 Giovanni Campagna <scampa.giovanni@gmail.com>

>  > I'm currently looking at the document CSS3 Values and Units:
> > http://www.w3.org/TR/css3-values/#specified0
> Better to look at http://dev.w3.org/csswg/css3-values (editor's draft)

Ah, thank you! It seems that most issues I was describing have gone. The
Editor's draft is certainly much clearer.

>  > 3) In section 4.1 the sentence "When there is no winning declaration,
> there
> > is no cascaded value" allows a null output as the result of the cascade.
> I
> > find this confusing. Conceptually my understanding is that all properties
> > have an initial value stored somewhere in the User Agent. Somehow the
> > various specification distinguish between initial values left to the User
> > Agent and initial values specified by the specifications. I can't see
> > however why an implementation would want to store both types of initial
> > values in anything but the User Agent's stylesheet. And as the UA
> stylesheet
> > is considered by the cascade I can't see how it can ever return a null
> > result. Can somebody shed some light?
> The initial value is a concept of the property (because you can have
> "initial" everywhere in CSS3), you cannot implement it with default
> stylesheets.

Huh? I didn't understand. Can you say that again with different words?

>  > 3b) Why isn't the "initial value" called the "default value"? It is
> after
> > all the value to use if all else fails!
> Initial is not default for default inherited properties (which get the
> computed value of the parent)

I'm getting tangled with words here. =) The -string- "initial" is not the
default for properties that have the string "inherited" as default, I agree.
But the expression -initial value- as used in the document (even in the
editor's draft) seems to be a perfect synonym of the expression "default
value", so why not use the expression "default value" instead, to make sure
that the string "initial" is used only in the context of "initial" as one
possible specified value of a property?

On a separate issue, I just noticed that in the editor's draft above,
opening paragraph of section 7, the specified value is defined as the result
of the cascade + inheritance. I find this questionable: inheritance should
not contribute to the specified value. The specified value should be just
that, the value specified by the author of the document or, if that's
missing, the value specified by the stylesheets, be it "initial", "inherit"
or a value. I'm saying this because although "initial" could be safely
replaced with the CSSOM-specified initial value (what I'd call a property's
-default value-, which could even be the string "inherit") it's important to
keep the string "inherit" stored in the specified value.

I.e., suppose I have  a <div> element: either eplicitely or because of its
default, it inherits the "color" property. Suppose the parent sets the
property to "red". For my understanding of the current description the
specified value of our <div> element immediately becomes "red". Now, suppose
that through scripting the <div> element is detched and reattached under a
parent with the color property set as "blue". How is the <div> element
supposed to remember that it used to inherit the color property from its
parent and should therefore change to "blue"?

Received on Tuesday, 29 September 2009 10:15:32 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:39 UTC