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

Re: [cssom] serialize a CSS declaration block

From: Glenn Adams <glenn@skynav.com>
Date: Tue, 21 Aug 2012 15:57:05 +0800
Message-ID: <CACQ=j+dyGDtXbW6w=cKTiEZLvrWjbHd-MT3U6PvKK11s7y5GwQ@mail.gmail.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Cc: www-style@w3.org
On Tue, Aug 21, 2012 at 2:28 PM, Daniel Glazman <
daniel.glazman@disruptive-innovations.com> wrote:

> Le 21/08/12 05:58, Glenn Adams a écrit :
>
>  http://dvcs.w3.org/hg/csswg/**raw-file/tip/cssom/Overview.**
>> html#serialize-a-css-**declaration-block<http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom/Overview.html#serialize-a-css-declaration-block>
>>
>
> Can the case of item 3, an empty property value, actually happen or is it
> just a sanity case? I've never seen something like that and I'm a
> _heavy_ CSS OM user...


I originally drafted it without sub-item 3; however, I then reviewed the
language under getPropertyValue() from DOM-2 Style which says:

getPropertyValue
Used to retrieve the value of a CSS property if it has been explicitly set
within this declaration block.
*Parameters*
propertyName of type DOMStringThe name of the CSS property. See the *CSS
property index* <http://www.w3.org/TR/1998/REC-CSS2-19980512/propidx.html>.
*Return Value*

DOMString

Returns the value of the property if it has been explicitly set for this
declaration block. Returns the empty string if the property has not been
set.

So I added sub-item 3 as a catch-all for this case. However, on reflecting,
item() would have to return a property name for which there no value to be
relevant in this context, so perhaps we simply need to prohibit item() from
enumerating a value-less property.
Received on Tuesday, 21 August 2012 07:57:55 GMT

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