Re: [cssom] serializing <color>

On Tue, Feb 16, 2010 at 10:37 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 2/16/10 3:28 AM, Anne van Kesteren wrote:
>>
>> On Mon, 15 Feb 2010 21:10:22 +0100, Boris Zbarsky <bzbarsky@mit.edu>
>> wrote:
>>>
>>> If so, then I have a related question. What _is_ the point of this
>>> part of the CSSOM? Editors can't use it, per above. Debuggers can't
>>> use it (certainly not if it's going to be that lossy). What _can_ use
>>> it? I'm not sure I see any use cases, offhand, and I'd like to
>>> understand our goals before trying to decide what the behavior should
>>> be. Maybe this functionality is just not needed at all.
>>
>> Script authors?
>
> Doing what, though?  Are they reading specified colors?  Computed colors?
>  Used colors?  Doing what with them?
>
> The only uses of the CSSOM for colors that I've seen around are in fact
> debuggers and editors...

I grab the value of the color property for my PIR jquery addon, so I
can generate an image with appropriate colors.  My color-parsing
function is much complicated than it should be just so it can handle
all possible variations correctly (though it would still fail if
system colors were used on some browsers).  I don't even handle hsl()
yet, so it might break in the future too (though in the future it will
be unnecessary, because you'll be able to rely on @font-face).

~TJ

Received on Tuesday, 16 February 2010 16:45:15 UTC