- From: L. David Baron <dbaron@dbaron.org>
- Date: Mon, 11 Apr 2011 16:36:42 -0700
- To: www-style@w3.org
The various methods of CSSStyleDeclaration, defined in http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface , need to document how they behave when given a shorthand property. This definition should be consistent with the idea that when the working group converts a longhand property into a shorthand, backwards compatibility with existing behavior is preserved (i.e., things work reasonably as long as all the values used are in the "shorthand" value space). For example: * getPropertyPriority should return "important" for a shorthand if all of the longhands that compose that shorthand have a priority of "important", but otherwise it should return the empty string. * getPropertyValue should return a value for a shorthand when the values for the longhand properties in the shorthand can be represented in the shorthand syntax, and should otherwise return the empty string. This behavior is actually specified in some detail in http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties (curiously enough, that's the wrong section to specify it in). I largely agree with that text, although I'd quibble with a few of the details there (particularly the "shortest form" requirement). * setters should just work :-) -David -- L. David Baron http://dbaron.org/ Mozilla Corporation http://www.mozilla.com/
Received on Monday, 11 April 2011 23:37:06 UTC