Re: style.background rendering - browser inconsistency

Err, I just reread the spec. and I was wrong. It states that the  
shortest possible combination of properties should be returned that  
give the same effect. So I suppose Opera and IE are right here?

Still, it has no rules on the order that I can find though.

""
When dealing with CSS "shorthand" properties, the shorthand  
properties should be decomposed into their component longhand  
properties as appropriate, and when querying for their value, the  
form returned should be the shortest form exactly equivalent to the  
declarations made in the ruleset. However, if there is no shorthand  
declaration that could be added to the ruleset without changing in  
any way the rules already declared in the ruleset (i.e., by adding  
longhand rules that were previously not declared in the ruleset),  
then the empty string should be returned for the shorthand property.

"" DOM2 Style spec.

- Elliott Sprehn



On Apr 3, 2007, at 3:02 PM, Elliott Sprehn wrote:

>
>
> It does say that background first sets all other properties to  
> their initial values, though the DOM spec doesn't state if these  
> should be returned when accessing background.
>>
>> The string returned by different browsers differs:
>> IE -- #afa
>> Firefox -- rgb(170, 255, 170) none repeat scroll 0% 0%
>> Opera -- #aaffaa

Received on Tuesday, 3 April 2007 19:13:30 UTC