- From: L. David Baron <dbaron@fas.harvard.edu>
- Date: Wed, 3 Feb 1999 23:10:20 -0500 (EST)
- To: www-dom@w3.org
- Cc: dbaron@fas.harvard.edu
Here are some comments and questions I have about the DOM Level 2 working draft, Chapter 1 (DOM CSS). [1] Some of my comments may be somewhat misguided. I am appoaching this with knowledge of CSS and stylesheets, but only very basic knowledge of the DOM. Section 1.2: interface StyleSheet Perhaps the definition of the title attribute should mention the complexity of the use of titles for sets of stylesheets as described in HTML40, section 14.3. [2] Section 1.3: interface CSSStyleDeclaration How do the functions in CSSStyleDeclaration handle shorthand properties [3] (e.g., margin)? I think the shorthand properties should be treated as decomposed into their full representations. This implies that when the related longhand properties (i.e., margin-top, etc.) are retrieved, they are all correct. When the longhand properties are set, the results are as expected, since the properties previously set on the shorthand properties and not changed will stay unchanged, but the property that was changed should be changed. When the shorthand properties are set, all the longhand properties of which they are composed are set/reset (per CSS spec). (I think this was likely understood by the authors, but I think it deserves mention.) For example, if the margin property is set to "1em 2em 3em 4em" (meaning top, right, bottom, and left margins), getPropertyValue("margin-left") should return "4em". If one then calls setProperty("margin-top", "0", ""), then I think getPropertyValue("margin") should return "0 2em 3em 4em". Question: Is it within the scope of the DOM to specify that some arguments to functions should be optional?? If so, I think priority on CSSStyleDeclaration::setProperty should be. Section 1.4: interface CSS2Properties Question: is there an attribute of type CSS2Properties in the interface CSS2StyleDeclaration? Or is it not mentioned because it is optional? David [1] http://www.w3.org/TR/WD-DOM-Level-2/css.html [2] http://www.w3.org/TR/REC-html40/present/styles.html#h-14.3 [3] http://www.w3.org/TR/REC-CSS2/about.html#shorthand -------------------------------------------------------------------- L. David Baron | Freshman, Harvard dbaron@fas.harvard.edu | < http://www.fas.harvard.edu/%7Edbaron/ > --------------------------------------------------------------------
Received on Wednesday, 3 February 1999 23:10:22 UTC