Re: Grayscale, lacuna value, and optional argument

> On 15. Mar 2016, at 01:52, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> 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.

Values had been optional in the past but after explicit requests from the CSS WG were made required. I am fine with making them optional again but that should be decided and recorded in a WG meeting IMO.

Greetings,
Dirk

> 
> ~TJ
> 

Received on Sunday, 4 June 2017 08:19:56 UTC