W3C home > Mailing lists > Public > www-style@w3.org > July 2008

[CSSOM] Can we have a .computedStyle in ElementCSSInlineStyle

From: Francois Remy <fremycompany_pub@yahoo.fr>
Date: Sat, 12 Jul 2008 15:26:18 +0200
Message-ID: <9570CC8F25614D5EAF973092F705E7CA@FremyCompany1>
To: "CSS 3 W3C Group" <www-style@w3.org>

Here's a proposal for the CSSOM Editor's Draft (Opera)

    interface ElementCSSInlineStyle {
      // Return the inline element style
      readonly attribute CSSStyleDeclaration style;
      // Return the JScript style (obsolete?)
      readonly attribute CSSStyleDeclaration runtimeStyle;
      // Return all rules that are finally applied to the element
      readonly attribute CSSStyleDeclaration currentStyle;
      // Return the style that's finally applied on the element
      readonly attribute CSSStyleDeclaration computedStyle;
    };

el.computedStyle must return the same value as 
defaultView.getComutedStyle(el)

----------------------------------------

Here's another proposal I want to do :
    interface ElementCSSPseudoElementContainer {
        readonly attribute DOMPseudoElement beforePseudoElement;
        readonly attribute DOMPseudoElement afterPseudoElement;
    }

If we decide to implement this, we also must define what a DOMPseudoElement 
implements, as interfaces.
But I think it whould be great if it can implements ElementCSSInlineStyle, 
and some others.

So we can find the style that's applied to the pseudoElements.

I also think that DOMPseudoElement should implements 
ElementCSSPseudoElementContainer in case we want to add something like this 
later :
element::before::before { } ==> 
<element><element::before><element::before::before></...></...></...>

-----------------------------------------

Even if we don't add the ElementCSSPseudoElementContainer to the W3CR, I 
think we must standardise the way the DOM representation of pseudo elements 
are implemented by UA.

Regards,
Fremy 
Received on Saturday, 12 July 2008 13:28:27 GMT

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