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

[cssom] CSSStyleDeclaration and shorthands

From: L. David Baron <dbaron@dbaron.org>
Date: Mon, 11 Apr 2011 16:36:42 -0700
To: www-style@w3.org
Message-ID: <20110411233642.GA9149@pickering.dbaron.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
   (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 :-)


L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Monday, 11 April 2011 23:37:06 UTC

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