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

On 05/29/2013 09:01 PM, Dirk Schulze wrote:
> Hi,
> During the WG meeting today, there was a question if 'mask: none;' can clear all masking operations on an element.
> As an introduction, the CSS Masking spec defines three main properties: mask, mask-box-image and clip-path where some are shorthands for a couple of longhand properties:
> mask
>      * mask-image, mask-source-type, mask-repeat, mask-position, mask-clip, mask-size
> mask-box-image:
>      * mask-box-image-source, mask-box-image-slice, mask-box-image-width, mask-box-image-outset, mask-box-image-repeat
> While the 'mask*' properties are similar to the 'background*' properties,
> the 'mask-box-image*' properties are similar to the 'border-image*' properties.
> Since 'mask' and 'mask-box-image' are two shorthands, it seems to be impossible
> to disable all masking operations with 'mask: none'.

That's because of the way the shorthands have been defined.
That can be changed to be more like the way 'border'
interacts with 'border-image'.

> The biggest problem is that the initial value for 'mask-image' is 'none' and
> therefore would always disable 'mask-box-image' as well.

This is an invalid issue. Shorthands don't have initial values
and don't reset anything unless they're explicitly specified.
(That declaration then gets expanded into the relevant longhands.)

> I added a note to the 'mask' property, that 'mask: none' will just disable
> masking by the 'mask*' properties, but not for 'mask-box-image*' properties.
> If there are no objections, I will remove the issue 1

I object to removing the issue without thinking through potential solutions
and concluding that it's in fact not a good idea to have a master shorthand
for masking.


Received on Wednesday, 5 June 2013 00:50:57 UTC