W3C home > Mailing lists > Public > www-style@w3.org > May 2011

[CSS OM] list of issues

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Fri, 27 May 2011 12:30:14 +0200
Message-ID: <4DDF7D36.7090907@disruptive-innovations.com>
To: "www-style@w3.org" <www-style@w3.org>
Hi there, I agreed during last CSS WG conf call to list a few of the
CSS OM issues I am hitting working on BlueGriffon. Here is a first

1. disabled attribute

    one HTML 4 erratum often listed between 1998 and now is about
    the lack of a disabled HTML attribute on <link> and <style> to
    reflect the CSS OM disabled attribute on stylesheets. Because of
    that, it is impossible to save the disabled status of an embedded or
    linked stylesheet. I think we should add at least a note here
    and make sure the WHATWG and HTML WG have that on their radar.

    We need a similar mechanism for the XML processing instruction.

2. interface CSSStyleSheet, serialization

    I think it is a pity that interface does not have a cssText
    attribute for complete serialization of the stylesheet.
    (note: could the serialization be done according to the
     presence of a @charset rule in the sheet?)

3. interface CSS, rule insertion and deletion

    the insertRule() and deleteRule() methods are string-based.
    This is suboptimal for embedders. Please see


    for a detailed explanation. We could even have

      insertCSSRuleBefore(rule, targetRule)

4. interface CSSImportRule, href

    href on that interface is readonly while it could be read-write.
    For an content editor, it forces the code willing to tweak an
    existing @import rule to create a new rule and delete the existing

5. interface CSSImportRule, creation

    It could be useful to be able to have some sort of listener notified
    when the stylesheet loaded by a newly inserted @import rule is
    loaded and available through the CSS OM. Could also be useful to
    notify load errors or security warnings (same origin, file URIs, ...)

6. global

    It could be useful to be able to have mutation listeners on

7. getComputedStyle

    One of the big lacks of the existing CSS OM is the impossibility to
    get the computed style of an element if a dynamic pseudo-class is
    applied. It would be really cool to extend getComputedStyle() and
    allow for instance ":hover" in the second parameter.

    Similarly, it's currently impossible to find the specified value
    for a given property for a given element. There are tons of use
    cases for online content editors. I think it would be great to
    finally have getSpecifiedStyle(elt, pseudo) replying the result
    of the cascade.

That's all for today.

Received on Friday, 27 May 2011 10:30:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:46 UTC