W3C home > Mailing lists > Public > public-fx@w3.org > July to September 2012

Re: Mask property syntax and CSS <image>

From: Dirk Schulze <dschulze@adobe.com>
Date: Mon, 6 Aug 2012 19:42:21 -0700
To: Brian Birtles <bbirtles@mozilla.com>
CC: Rik Cabanier <cabanier@gmail.com>, "public-fx@w3.org" <public-fx@w3.org>
Message-ID: <010E0C1A-CB81-445F-AA48-6763F352AE0D@adobe.com>

On Aug 6, 2012, at 7:14 PM, Brian Birtles <bbirtles@mozilla.com> wrote:

> Hi Rik,
> 
> (2012/08/07 11:02), Rik Cabanier wrote:
>>       mask: url(#circleElem); // alpha
>> 
>>    and, likewise,
>> 
>>       mask: linear-gradient(...); // -webkit-mask makes this alpha
>>       mask: url(#gradientElem); // alpha
>> 
>> 
>> I don't follow this. Why do these 3 examples use alpha?
> 
> Ignore the first example. I think we're going to require using element() 
> syntax for directly referencing SVG elements as image mask sources so 
> the first example is invalid.
> 
> The second one, 'linear-gradient()' uses a default of alpha for two reasons:
> 
> * Because -webkit-mask does. That's not such a big concern to me but 
> obviously if we change this behaviour it makes it harder for content 
> authors who are relying on the current behaviour of -webkit-mask to 
> transition to the new behaviour.
> 
> * More importantly, for implementers it means that all <image> values 
> can be treated the same (since gradients are a type of <image> value).
> 
> For the third example, IF we decide that a CSS gradient defaults to 
> alpha, then I think we should be consistent when pointing to an SVG 
> gradient.
> 
>> I think we need feedback from designers/tool makers.
> 
> That would be good, as well as web developers and other content authors.
> 
>> I know many designers use the same outlines of artwork as a mask. My
>> fear is that since luminosity is not the default and misunderstood, it
>> will end up not being implemented.
> 
> That's an important consideration. However, I think all major browser 
> vendors have already implemented luminosity for SVG though so we should 
> be ok right?
Yes, and Rik is just thinking about the new features like referencing a painted object, image or paint server that are not implemented anywhere.

There is the exception for WebKit which does already implement image and gradient masking. And WebKit already does use alpha as default value. Therefore I wouldn't worry that implementations don't follow. And authoring tools would be wise to follow implementations. However, if the tools creator or designer believe that luminance is what they want, they just need to add the keyword 'luminance'. Like I said before, we can add an issue to the spec that it needs to be considered to change the default value. The spec still could get to CR, since the implementation feedback is required.

And I agree that paint servers, element() or referenced images should be used as mask with the same default value. Mask elements on the other side should use luminance as default value for legacy reasons. We wouldn't break any content from current authoring tools. Maybe we can agree on that statement first and solve 'alpha'/'luminance' for the first part later. I don't think that we need to many discussions at this point about a default value.

Greetings,
Dirk

> 
> Brian
> 
Received on Tuesday, 7 August 2012 02:42:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 7 August 2012 02:42:50 GMT