Re: [css-om][css-variables] exposing variables through CSSStyleDeclaration

On Wed, 28 Aug 2013 10:43:35 +0200, Cameron McCormack <cam@mcc.id.au>  
wrote:

> Simon Pieters wrote:
>> The CSSOM spec is probably wrong when it comes to how to deal with
>> variables. I'll look into fixing it.
>>
>> I'm not sure what getComputedStyle should do. I guess include all
>> "supported CSS properties" (i.e. excluding variables) and then include
>> the specified variables.
>
> Yes.  In terms of the order of the declaration (for item()), we can  
> stick the variables after all of the other supported properties.  I'm  
> not sure what order they should appear in, though.  Do you think we need  
> them to be in a specific order (somehow taken from the order of matching  
> rules and declarations within those rules, or sorted order)?

getComputedStyle doesn't say what order to use right now.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2498

Blink and Gecko start out with alphabetical order but then have some at  
the end not in alphabetical order. (I didn't check other browsers.)

The spec could require alphabetical order for all properties, or only for  
the non-variable properties and then the variable properties at the end  
(also in alphabetical order?). Since the number of supported properties  
change over time sites and differ between browsers, sites can't rely on a  
certain index being a given property, so we might as well sort the whole  
list in alphabetical order.

-- 
Simon Pieters
Opera Software

Received on Wednesday, 28 August 2013 09:20:41 UTC