Re: [css-color] Remove gray() Notation

On 08/18/2014 07:57 AM, Tab Atkins Jr. wrote:
> On Sat, Aug 16, 2014 at 8:58 PM, Patrick Dark
> <www-style.at.w3.org@patrick.dark.name> wrote:
>> I would suggest scrapping the gray() notation and replacing it with the
>> following:
>>
>> • hsl(<lightness>) where hue = 0deg and saturation = 0%
>> • hsla(<lightness>, <alpha>) where hue = 0deg and saturation = 0%
>>
>> These notations have the following authoring advantages over the gray()
>> notation:
>> • Hue and saturation can be added without replacing or removing parts of a
>> preexisting value; only additions are required.
>> • Hue and saturation can be removed by simply deleting preexisting values.
>
> We just did a poll of authors, actually, and got the result that rgb()
> with a single value (or rgba() with two values, for gray and alpha) is
> strongly preferred by authors.
>
> Since percentages are allowed, this is precisely the same syntax that
> you proposed, just with a different function name.  You can also use
> numbers 0-255 if you prefer, though.  (It also has a slight learning
> advantage, I think. Removing from the front is slightly less intuitive
> than removing from the back, and repeating the provided argument for
> the missing ones is easy to understand as well.)

Yes, but if we're providing this shorthand in rgb notation, it makes a
fair bit of sense to also allow it for hsl notation.

~fantasai

Received on Monday, 18 August 2014 20:15:11 UTC