Re: mask-type property

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. 
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).

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.

Received on Wednesday, 21 November 2012 05:25:35 UTC