[css-masking] Should clip-path/mask be clipped/scaled to the owning element?

Both the clip-path[0] and mask-image[1] specs appear to allow specifying a
clip/mask that is larger than the owning element (e.g. a polygon(..) offset
or sized to exceed the element, or a mask image that is larger than the
element.) However, I cannot find anywhere in the spec that specifies
whether a clip-path/mask should be clipped or scaled to the owning element
or not.

Can anyone clarify the expected behavior for clip-path and mask-image under
these conditions?

Checking across the browsers, I found that Chromium, Safari, and Firefox
Nightly all seem to implement the same behavior - the clip-path is
*not* clipped/scaled
by the owning element, whilst the mask-image is clipped. It is unclear to
me why these behaviors were chosen (i.e. why let one escape the bounds but
not the other).

For an example, see http://output.jsbin.com/fiyoviz/10 . In this example
the polygon(..) clip-mask extends outside the 50x50 owning div, whilst the
mask-image is constrained to 50x50. (Note: there is a rendering bug for the
mask-image example in Chrome M55 stable, which is fixed in dev.)

[0] https://www.w3.org/TR/css-masking/#the-clip-path
[1] https://www.w3.org/TR/css-masking/#the-mask-image

Received on Tuesday, 20 December 2016 21:43:59 UTC