SVG 'overflow' initial value wrong?

Hi,

I am looking at the definition of the 'overflow' property in SVG2[1]. According to the spec, the initial value is 'visible'. In practice browsers act as if the initial value is 'hidden'. FF and Safari/Chrome also say that the initial value is 'hidden'. Just Opera states it is 'visible' but still acts as if 'hidden' was set. You can see it with the following example:

Tested with following example:

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

and set overflow="visible" on the inner SVG element afterwards. You will notice the difference in all browsers. And all browsers have the same rendering output.

I would suggest making 'hidden' the default value.

Greetings,
Dirk

[1] https://svgwg.org/svg2-draft/masking.html#OverflowAndClipProperties

Received on Wednesday, 10 October 2012 21:08:21 UTC