Re: [css-masking] 'mask: none' clear all masking operations

On Wed, Jun 26, 2013 at 3:19 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> On 06/26/2013 12:57 PM, Dirk Schulze wrote:
>>
>>
>> Thinking about your proposal more, I actually take my response back
>> and claim the opposite :). What about the following structure:
>>
>>   mask
>>    +-- mask-layers
>>    |    +--mask-layer-image
>>    |    +--mask-layer-position
>>    |    +--mask-layer-repeat
>>    |    etc.
>>    +-- mask-element
>>    +-- mask-box
>>         +--mask-box-source
>>         +--mask-box-slice
>>         +--mask-box-repeat
>>         etc.
>>
>> mask-element: <url> [alpha | luminance]? | none
>>
>> mask: <mask-element>
>>
>> * mask-element is separated of mask-layers.
>> * mask-layer, mask-box just reference CSS Images
>> * mask shorthand overrides all properties of mask-layer, mask-element,
>> mask-box
>> * mask syntax does the same as mask-element
>>
>> Would that be reasonable?
>
> Yes, it's totally reasonable.
>
> However, I am wondering if we can allow a bit more into the shorthand,
> e.g.
>
>   mask: <mask-element> | <mask-layer>;
>
> with the added provision that a <url> represents <mask-element>
> and other forms of <image> represent a mask-layer. (I'm not 100%
> sure that works, but maybe it works.)

Yes, it's possible, though a bit nasty.  In the prose, you'd just have
to define that for the purposes of this property, <url> isn't part of
the <image> type that <'mask-layer'> accepts, so that it has to fall
into the <'mask-element'> bucket.

> I still don't understand, btw, why we can't use SVG masks in the
> mask-layers feature?

It's troublesome for implementations if they can't tell at parse-time
whether a link is meant to be an internal reference or an image.
There are substantially different and separate loading paths for the
two possibilities.

~TJ

Received on Wednesday, 26 June 2013 23:37:49 UTC