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

Re: [css3-values] RE: CSSStyleDeclaration#length and shorthands.

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 01 Feb 2012 16:30:48 -0500
Message-ID: <4F29AF08.5070000@mit.edu>
To: Glenn Adams <glenn@skynav.com>
CC: www-style@w3.org
On 2/1/12 4:26 PM, Glenn Adams wrote:
> I am using "declaration block" in the sense defined by CSS2.1 [1] here,
> which corresponds to the value of the cssText property as opposed to an
> CSSStyleDeclaration instance.

OK.  I don't think that's a useful concept for thinking about .length 
and .item on a CSSStyleDeclaration, then.

>     I already said that earlier in this thread: I think length() should
>     return the number of longhand properties that are set in the
>     declaration and item() should iterate the longhand properties.
>       That's a simple behavior to define (modulo the fact that the
>     current CSS spec has no actual concept of "set in the declaration").
>       The only drawback is forward-compat as properties that used to be
>     longhands become shorthands....
> So, if cssText returns only a shorthand, then is length 0?

No, it's the number of longhand properties set by that shorthand.

Received on Wednesday, 1 February 2012 21:31:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:11 UTC