[css-masking] 'mask-source-type' and 'mask-type' (was: Re: [css-masking] Comments)

On Dec 11, 2013, at 11:46 AM, fantasai <fantasai.lists@inkedblade.net> wrote:

>   8. Does 'mask-source-type' apply to 'mask-box-image-source'?
>      It's not clear from the spec. (See editorial issue #8, of
>      which this seems to be a symptom.)

No, it does not. That is one reason why it is not mask-box-image-type. mask-box-image just supports alpha masking at the moment. Since you can apply mask-box-image and mask-image on an element, it wouldn’t make sense to have the same property set the mask type for both.

> 
>    If it doesn't:
>      8.A.1 Having its name match mask-x-type per issue #1 would
>            help clarify that relationship.
>      8.A.2 This raises the issue of whether we need a mask-y-type.

This will not part of the discussion in this thread. (See [css-masking] Comments.)

> 
>    If it does:
>      8.B.1 I should be pulled out into the same section as the
>            'mask' shorthand, since they both apply to both types
>            of masking.
>      8.B.2 Also, in this case, I'd like to reraise the question of
>            whether mask-source-type and mask-type should be merged.
>            I think it would be less confusing if there was just one
>            property and its value at the point of application overrode
>            its value at the point of source definition, the same way
>            the 'width' property does.

I take the question to merge 'mask-source-type' and 'mask-type’.

Both properties apply to different element. ‘mask-source-type’ applies to SVG graphical element, SVG containers and HTML elements. mask-type applies to SVG mask elements exclusively.

In the following I describe the reasons why they are separate properties:
* mask-type defines the type (luminance|alpha) of the <mask> element. The author of the mask defines the preferred type for the created mask.
* mask-source-type interacts with mask-type: a preference from the author of the mask element can be overruled by the author of the document. The spec has an example where this can make sense. Note: the mask can be in a different document, written by a different author.
* mask-source-type has a value auto to chose the preferred masking type of the SVG mask.
* mask and its longhands do not apply to the mask element. A special casing of mask-source-type seems strange.
* mask-type stays a single item property. mask-source-type is designed for a layer based mask, which will happen eventually - in the next version of the spec.

We discussed this before as well.

Greetings,
Dirk

Received on Wednesday, 11 December 2013 16:13:12 UTC