Re: [cssom] comments on value serialization rules

On Thu, 18 Feb 2010 17:06:02 +0100, L. David Baron <dbaron@dbaron.org>  
wrote:
> On Thursday 2010-02-18 15:00 +0100, Anne van Kesteren wrote:
>> >I'm not particularly committed to keeping it that way, though.
>> >However, I'm somewhat concerned about the idea of switching to
>> >#rrggbb notation since rgb() can handle out-of-sRGB values whereas
>> >#rrggbb cannot.  (Gecko doesn't currently implement that, but I'd
>> >like to.)
>>
>> And then sometimes serialize to percentages? Or would you propose a
>> change to the rgb() syntax as well? My main gripe here is <canvas>
>> which uses #rrggbb and IE, which also uses #rrggbb (though I should
>> probably test that again to be sure).
>
> rgb() allows rgb(300,-10,300).

Ah right, I see.

So the problem is that <canvas> does not support this at all. It  
serializes color values using the #rrggbb notation and the  
CanvasPixelArray is 8-bit bound. I don't really know enough about it to  
make a good call here I think, but the options as I see them are 1) accept  
that color components are limited to 8 bits and be compatible with  
<canvas>; 2) fix <canvas> somehow (how?); 3) accept that <canvas> has  
limitations.

(IE does not appear to use #rrggbb for currentStyle after all.)


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

Received on Thursday, 18 March 2010 10:12:45 UTC