Re: [cssom] Idiom for representing at-rules containing properties?

On Fri, 28 Jun 2013 00:18:41 +0200, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 6/27/13 5:54 PM, Tab Atkins Jr. wrote:
>> I think that using .style makes sense when the set of properties is
>> large and ever-growing, like it is for normal CSS properties.  The
>> CSSStyleDeclaration interface makes it at least somewhat more
>> convenient to determine what properties are actually set
>
> I think we should only use CSSStyleDeclaration specifically for things  
> whose set of properties in fact matches the set of properties in style  
> declarations.  If we want an object for "all the properties" for other  
> cases, it should be a different object.

Yes, but that wasn't what Tab was asking about.

The question is, should we use

pagerule.margin
pagerule.marginTop
pagerule.marginRight
pagerule.marginBottom
pagerule.marginLeft

(without setProperty, getPropertyValue, et al)

or

pagerule.style

where the returned object that's similar to but isn't CSSStyleDeclaration.

-- 
Simon Pieters
Opera Software

Received on Thursday, 27 June 2013 22:41:44 UTC