'clip' property and the behavior on 'auto'

Hi,

After a discussion with the CSS WG, we agreed to move the 'clip' property definition[1][2] to CSS Masking[3] as well. The behavior differs between HTML and SVG on 'auto'. While 'auto' has no effect on HTML elements, it means clipping to the viewport created by the given element in SVG. Note that the property just applies to elements that establish a viewport like svg and patterns or markers.

But content seems not be clipped to the viewport (by the 'clip' property) at the moment. I just tested with SVG yet.

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" height="500">
  <rect width="500" height="500" fill="red"/>
    <svg width="200" height="200" overflow="visible" clip="auto">
      <rect width="500" height="500" fill="green" />
    </svg>
</svg>

In this case, the green rectangle should be clipped to one viewport. Therefore, parts of the red rectangle should be visible, but aren't (Tested with Opera, FF, Chrome/Safari, Batik).

I would suggest following the general definition of CSS 'clip' and let 'auto' have no affect on elements. Or do we need the property to specify the behavior on pattern and marker? (I just checked, unlike for the 'overflow' property, we don't have specific US styles for 'clip' :)).

Greetings,
Dirk

PS: I noticed that 'rect(0,200px,200px,0)' on the inner SVG element did not work for 'clip' on any browser either.

[1] https://svgwg.org/svg2-draft/masking.html#OverflowAndClipProperties
[2] http://www.w3.org/TR/CSS2/visufx.html#propdef-clip
[3] http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html

Received on Wednesday, 10 October 2012 21:54:41 UTC