- From: Braden N. McDaniel <braden@shadow.net>
- Date: Thu, 18 Mar 1999 02:17:34 -0500
- To: <www-dom@w3.org>, "L. David Baron" <dbaron@fas.harvard.edu>
- Cc: <www-style@w3.org>
----- Original Message -----
From: L. David Baron <dbaron@fas.harvard.edu>
To: <www-dom@w3.org>
Sent: Thursday, March 11, 1999 3:17 PM
Subject: Access to element styles?
> 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?)
Why not just have it take a string value, the same way the STYLE attribute
does?
> The specificity of a rule created through such an interface, should
> probably be the same as if it were a STYLE attribute.
Yup.
> See my post [3]
> on why the specificity of the STYLE attribute should be changed (to
> the way it is implemented in browsers).
What we're really missing here is a binding between a scripting language and
the style sheet. The DOM, as it stands, provides dynamic documents. Is there
a demand for dynamic style sheets? Is there a place for
@script(stylemebaby.js);
in the new world order?
I'm not claiming the answer's "yes", but given browser developers'
initiative in shoehorning a CSS-esque syntax into their DOM implementations
(where I think it *really* doesn't belong), I think the question bears
asking.
Braden
Received on Thursday, 18 March 1999 02:17:40 UTC