Re: 'clip' property and the behavior on 'auto'

Dirk,

Firefox implements CSS 2.1 clipping for both SVG and HTML content.

In CSS 2.1 it says

'auto' The element does not clip.

If you want clipping you need an overflow value other than visible (This
value indicates that content is not clipped per CSS 2.1) and you want the
svg width/height to be larger than the clip region to see clipping occur.

This clips on Firefox for instance.

<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="500" height="500" clip="rect(0,200px,200px,0)" >
      <rect width="500" height="500" fill="green" />
    </svg>
</svg>

Best regards

Robert

Received on Thursday, 11 October 2012 09:42:42 UTC