W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [cssom] serialize a CSS declaration block

From: Florian Rivoal <florian@rivoal.net>
Date: Wed, 22 Aug 2012 23:20:36 +0200
To: www-style@w3.org
Message-ID: <op.wjgn8mnlf5de51@localhost.localdomain>
On Tue, 21 Aug 2012 05:58:04 +0200, Glenn Adams <glenn@skynav.com> wrote:

> I've taken a stab at specifying [1] the top-level algorithm for  
> serializing
> a CSS declaration block, i.e., at what is returned by
> CSSStyleDeclaration.cssText. The way I have approached it is to tie the
> result to the the process of enumerating item() and invoking
> getPropertyValue() for each item. IMO, this seems the most logically
> correct approach [in the sense that item() should return the name of  
> every
> property (and only those properties) returned in the serialization via
> cssText].
>
> I've also encoded the delimiter and whitspace rules that seem to be most
> common; namely, that each declaration except the last is followed by "; "
> and the last is followed by ";" (with no extra whitespace).
>
> Comments please!
>
> [1]
> http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom/Overview.html#serialize-a-css-declaration-block

This looks reasonable to me, as it is indeed the most common behavior as  
far as I've been able to observe.

  - Florian
Received on Thursday, 23 August 2012 09:11:51 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:58 GMT