W3C home > Mailing lists > Public > www-dom@w3.org > January to March 1999

Access to element styles?

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Thu, 11 Mar 1999 15:17:29 -0500 (EST)
Message-Id: <199903112017.PAA31694@login1.fas.harvard.edu>
To: www-dom@w3.org
Are there any plans for the DOM Level 2 to allow access to the CSS
properties of a specific element?  The DOM Level 1 hinted at this in a
comment [1] that the style attribute of the HTMLElement interface was
reserved for future use.  Could this style attribute be of type
CSS2Properties [2]?  (Yes, I know that limits the style language.
Perhaps there should be access to the Content-Style-Type first set by a
META or HTTP header.  But then the property names are messy.  Would
part of it be better off being a function that adds a declaration to a
STYLE attribute?)

The specificity of a rule created through such an interface, should
probably be the same as if it were a STYLE attribute.  See my post [3]
on why the specificity of the STYLE attribute should be changed (to
the way it is implemented in browsers).


[1] http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-011100101
[2] http://www.w3.org/TR/WD-DOM-Level-2/css.html#Level-2-CSS-extended
[3] http://lists.w3.org/Archives/Public/www-style/1999Feb/0001.html
    clarified in

L. David Baron    Freshman, Harvard    dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.  < http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC                < http://www.webstandards.org/css/ >
Received on Thursday, 11 March 1999 15:17:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:05 UTC