W3C home > Mailing lists > Public > www-style@w3.org > July 2014

Re: [css-color] Exposing browser color parsing to JS

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 9 Jul 2014 19:20:21 -0700
Message-ID: <CAAWBYDDFTivev=-yD8bWZ0v9Rdme4baNKZ+MaXTiweQniWz=Xg@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: www-style list <www-style@w3.org>
On Wed, Jul 9, 2014 at 10:47 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
> On 09/07/14 17:58, Tab Atkins Jr. wrote:
>> It would suck if we had a function called parseColor that couldn't
>> parse all colors.  I don't understand why the restriction would be
>> useful.  It's true that "inherit" isn't a color, but it can be the
>> value of the 'color' property, and I'd like to maintain the invariant
>> that you can *always* feed the value of 'color' into it and get a
>> useful result out.
> I still think this adds more complexity than the benefit is worth, but I
> won’t oppose it any more than this. (Since the parameter is optional.)

On further thought, I can't actually support the global keywords.  I
can do "inherit" with nothing more than an element as context, but I
can't support "initial" without a property as context.  So let's just
strike the global keywords and stick with colors.

That does mean that the second argument is only used for
"currentcolor" in CSS, but SVG is, I think, adding some additional
keywords that work similarly to make <use> work better, so it might
have some friends soon.

Received on Thursday, 10 July 2014 02:21:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:44 UTC