Re: concern about CSSStyleDeclaration

Daniel Glazman wrote:
> 
> CSSStyleDeclaration provides means to determine the style properties
> currently set in a block or to set style properties explicitly within
> the block. All methods in CSSStyleDeclaration assume that there is only
> one answer per property name. But this is false, unless part of the
> cascade is done :
> 
>    P { color : red ! important ;
>        color : blue ;
>        color : yellow ! important }
> 
> Without applying some of the rules of the cascade, the CSS OM cannot
> answer that the value of color assigned in this block is |yellow| with
> and cannot answer it is an important declaration.

I agree. We optimized the representation of the styleproperties from the
CSS file. But you will never be able to use |red| or |blue| informations
in the representation of your document.

> Anyway, I think that the CSS OM should provide access to ALL explicitely
> set values for a given property, in order of declaration, without
> applying the cascade.

Could you please provide a use case?

We already acknowledged in the past that the CSS Object Model wasn't
suitable for CSS editors given that a lot of informations are lost
(white spaces, character representation, comments).

Philippe

Received on Tuesday, 10 April 2001 18:36:59 UTC