Re: [cssom] serializing <color>

On Tue, 16 Feb 2010 17:51:55 +0100, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> So it sounds like you really want access to the "used color", right?  I  
> have no problem with whatever canonicalization we want for used colors,  
> or even computed ones.  I'm just not convinced that _specified_ colors  
> should be canonicalized.  That would lead to all sorts of weirdness like  
> .style.color not matching the string that appears in  
> getAttribute("style"), for example.

Firefox is broken in that respect already and no other browser keeps those  
consistent either. Another Live DOM Viewer example:

<!DOCTYPE html>
<body style=color:#fff>x
<script>w(document.body.style.color)</script>

Firefox _manipulates_ the style attribute and gives rgb(255, 255, 255) for  
.style.color.

Opera keeps the style attribute as is and gives #ffffff for .style.color.

Chrome keeps the style attribute as is and gives rgb(255, 255, 255) for  
.style.color.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Tuesday, 16 February 2010 17:23:31 UTC