W3C home > Mailing lists > Public > public-html@w3.org > April 2007

Re: style.background rendering - browser inconsistency

From: Elliott Sprehn <esprehn@gmail.com>
Date: Tue, 3 Apr 2007 15:02:36 -0400
Message-Id: <806F317C-E6D0-4096-8744-26BC2DA5529B@gmail.com>
Cc: public-html@w3.org
To: David Dailey <david.dailey@sru.edu>
This is symptomatic of the lack of any specific rules governing this  
in the CSS and DOM specifications.

CSS defines that the properties specified in the shorthand background  
property declaration can come in any order, and the DOM specification  
doesn't have any specific rules on what should be returned.

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.

I don't really think this is in the scope of the HTML WG to specify  


- Elliott Sprehn

On Apr 3, 2007, at 11:53 AM, David Dailey wrote:

> I'm not sure if this is an HTML problem or a CSS problem or an ECMA  
> script problem, so am not sure if it belongs in this discussion or  
> not.  I suppose it has to do with the orthogonality principle.
> Consider the following:
> <html>
> <body onload="document.getElementById 
> ('R').innerHTML=document.getElementById('Q').style.background">
> <div style="background:#afa" id="Q">Bonjour</div>
> <div id="R"></div>
> </body>
> </html>
> It doesn't matter if I use innerHTML or a DOM2 nodeValue approach  
> -- alert() shows the same discrepancy.
> The string returned by different browsers differs:
> IE -- #afa
> Firefox -- rgb(170, 255, 170) none repeat scroll 0% 0%
> Opera -- #aaffaa
> One can program around it, but it is a bit counterintuitive to me  
> that one gets three different answers.
> David Dailey
Received on Tuesday, 3 April 2007 19:02:49 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:18 UTC