W3C home > Mailing lists > Public > public-fx@w3.org > January to March 2016

Re: Grayscale, lacuna value, and optional argument

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 14 Mar 2016 17:52:30 -0700
Message-ID: <CAAWBYDC=ue3FrUigBFQ=uUro_5nwu_sdJUkSC=j4-d75KUrmBg@mail.gmail.com>
To: Amelia Bellamy-Royds <amelia.bellamy.royds@gmail.com>
Cc: Chris Lilley <chris@w3.org>, "public-fx@w3.org" <public-fx@w3.org>
On Mon, Feb 1, 2016 at 2:25 PM, Amelia Bellamy-Royds
<amelia.bellamy.royds@gmail.com> wrote:
> On 1 February 2016 at 15:02, Chris Lilley <chris@w3.org> wrote:
>> The ED of filters says that the lacuna value for the grayscale filter is
>> zero.
>>   https://drafts.fxtf.org/filters/#FilterProperty
>> However:
>>  - the syntax does not seem to allow the argument to be omitted so how
>>    can the lacuna value be used
>>  - if it did, then 0 is an odd value
>> 0 means no change. Thus seems unintuitive. I would expect grayscale()
>> to be equivalent to grayscale(100%) which is likely what authors would
>> expect and would be convenient for the most common use case "make this
>> grayscale".
>> Suggested fix:
>>  - change the grayscale filter syntax to make the argument optional
>>  - change the lacuna value to 1
>> Btw I added some tests for grayscale since there was only one (100%)
>> so I added 1, 0, 0% and 300% as well.
> For what it's worth, this seems to be how -webkit-filter is implemented.  In
> other words, -webkit-filter: grayscale() applies 100% grayscale filter (in
> Chrome anyway, haven't tested Safari).
> For implementers of the standard property, neither Edge nor Firefox
> currently support the function without a parameter, so changing the lacuna
> value would not break anything that isn't already broken.
> I also agree that it is more useful/logical to have the default function be
> complete grayscale.

Yes, it should be omittable.  All of the functions need similar edits.

I'm not even sure what "the lacuna value for interpolation" *is*.
First, "Lacuna value" is an SVG-ism defined in that spec; CSS specs
instead use normal English and talk about what to do when something is
omitted. ^_^  Second, this is the default value *in general*; I don't
know what this has to do with interpolation.

Received on Tuesday, 15 March 2016 00:53:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 15 March 2016 00:53:18 UTC