[whatwg] CSS2 system colors in legacy color values

Tab Atkins Jr. jackalmage at gmail.com
Mon May 31 22:37:16 PDT 2010


On Mon, May 31, 2010 at 2:51 AM, Roger Hågensen <rescator at emsai.net> wrote:
> Just did some tests! It seems that the latest Firefox, Opera, IE, and Chrome
> at least supports fractional percentages.
> So rgb(0%,0%,80.00% equals 0,0,204
> and rgb(0%,0%,80.99% equals 0,0,207
> and rgb(0%,0%,80.50% equals 0,0,205
>
> I wonder why the specs don't mention this support though,
> and I guess that a value of 200% (what, like infared?) would mean twice as
> red as SRGB red (100%),
> and in the case of these browsers they clamp anything higher to 255.

What spec should mention it?  CSS already does, in the CSS3 Values and
Units spec.  A <percentage> is a <number> followed by a '%' character,
and a <number> is a float.

~TJ


More information about the whatwg mailing list