W3C home > Mailing lists > Public > www-svg@w3.org > October 2012

SVG 'overflow' initial value wrong?

From: Dirk Schulze <dschulze@adobe.com>
Date: Wed, 10 Oct 2012 14:07:02 -0700
To: "www-svg@w3.org list" <www-svg@w3.org>
Message-ID: <20799564-1957-4AE0-A974-9921990DA136@adobe.com>

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)"/>

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.


[1] https://svgwg.org/svg2-draft/masking.html#OverflowAndClipProperties
Received on Wednesday, 10 October 2012 21:08:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:37 UTC