W3C home > Mailing lists > Public > www-style@w3.org > February 2010

Re: [cssom] serializing <color>

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 16 Feb 2010 18:12:19 +0100
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "CSS WG" <www-style@w3.org>
Message-ID: <op.u78cqtek64w2qv@annevk-t60>
On Tue, 16 Feb 2010 18:06:39 +0100, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 2/16/10 11:59 AM, Anne van Kesteren wrote:
>> 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.
>
> In a completely static document, yes.  If you set .style.color from  
> script, then every UA I'm aware of has the style attribute value  
> matching the .style.color getter-provided value thereafter.

Sure, but it is normalized, in the three UAs I tested. Another example  
that tests this scenario:

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

So if you think this is ok, changing specified values should be ok too  
(and in fact already happens). Figuring out to what degree we want to  
canonicalize them was the idea of this thread. Preserving system colors  
makes sense to me, for instance.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Tuesday, 16 February 2010 17:23:04 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:24 GMT