W3C home > Mailing lists > Public > www-svg@w3.org > November 2012

Re: mask-type property

From: Dirk Schulze <dschulze@adobe.com>
Date: Wed, 21 Nov 2012 15:43:53 -0800
To: Cameron McCormack <cam@mcc.id.au>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, SVG public list <www-svg@w3.org>
Message-ID: <BA98CD90-3B3D-4924-BBE2-514F6BD5ABE9@adobe.com>

On Nov 20, 2012, at 9:24 PM, Cameron McCormack <cam@mcc.id.au> wrote:

> Dirk Schulze:
>> I thought about 'mask-type' again, and it just feels cleaner to move
>> 'mask-type' back to the mask shorthand.
> I kind of agree that 'mask-type' not being the component of the mask 
> shorthand that specifies how to interpret the referenced mask is a bit 
> confusing (since all the other 'mask-*' properties are components of 
> 'mask').  But I think it would be more confusing for 'mask-type' to be 
> usable on both an element referring to a mask and on a <mask> element 
> itself, since 'mask-type' really would have a different meaning.
> Furthermore, I would add the
>> value 'auto' (with initial value 'auto') for various reasons:
> Yes, if 'mask-type' now represents the "alpha | luminance" bit of the 
> <mask-image> and <mask-source> types, then it makes sense for it have an 
> auto value.
>> We can even keep the property on <mask> element, it would just have a
>> different meaning ('mask' does not apply to <mask> currently).
>> The mask property would have the following syntax:
>> <mask-property> = luminance | alpha | auto

> Is that the 'mask' shorthand property?  I don't know that it makes sense 
> to interpret that differently depending on the element it applies to. 

should be mask-type: [luminance | alpha | auto]#

> But you could change its grammar to allow not specifying the source part 
> of a <mask-source>, and then you could write
>   <svg ...>
>     <mask style="mask: alpha">
>     </mask>
>   </svg>
> and it would set mask-type:alpha (and the other 'mask-*' properties 
> which would have no effect on a <mask> element).

That would be possible, yes.

> I'm wondering whether using 'mask-type' for both things (how to 
> interpret a referenced mask, and how to interpret the <mask> element it 
> is on) is not right, and that we should therefore have a different 
> property to use on <mask> elements.

Yeah, we can think about it again. I am not really opposed to a different solutions. However, I think it is reasonable to use the same property. Masks don't apply to <mask> elements anyway at the moment.

Received on Wednesday, 21 November 2012 23:44:26 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:30 UTC