- From: Doug Schepers <schepers@w3.org>
- Date: Tue, 23 Sep 2008 09:03:46 -0400
- To: David Hyatt <hyatt@apple.com>
- CC: CSS WG <w3c-css-wg@w3.org>, public-svg-wg@w3.org, David Singer <singer@apple.com>, Maciej Stachowiak <mjs@apple.com>, David Singer <singer@apple.com>
Hi, Dave- David Hyatt wrote (on 9/17/08 6:00 PM): > > The CSS 2.1 and SVG 1.1 specs working together imply that an SVG > document does not have scrollbars in a Web browser. > ... > CSS says: > > http://www.w3.org/TR/CSS21/visufx.html#overflow > > "UAs must apply the 'overflow' property set on the root element to the > viewport. HTML UAs must instead apply the 'overflow' property from the > BODY element to the viewport, if the value on the HTML element is > 'visible'. The 'visible' value when used for the viewport must be > interpreted as 'auto'. The element from which the value is propagated > must have a used value for 'overflow' of 'visible'." > > We do this in WebKit too. > > Therefore the overflow:hidden on SVG root elements is applied to the > viewport and you end up not getting scrollbars. > > The WebKit bug is: > > https://bugs.webkit.org/show_bug.cgi?id=11225 > > It seems like SVG should possibly amend its UA sheet to: > > svg:not(:root) { overflow: hidden } Based on feedback from the community, the state of implementations, and on discussion in the SVG WG, we agree to make an errata on this issue (and to change all future specs). Rereading the CSS snippet, which sort of overrides the behavior of 'visible', might it not simply make sense to make the value of root 'auto', and get rid of the level of indirection? Here are two proposals for rewording the offending passage: 1) svg:root { overflow: auto } svg:not(:root) { overflow: hidden } [[ The initial value for 'overflow' as defined in [CSS2-overflow] is 'visible'; however, SVG's user agent style sheet overrides this initial value and set the 'overflow' property on elements that establish new viewports (e.g., 'svg' elements), 'pattern' elements, and 'marker' elements to the value 'hidden'. The root 'svg' element shall have an initial 'overflow' property value of 'auto'. ]] 2) svg:not(:root) { overflow: hidden } [[ The initial value for 'overflow' as defined in [CSS2-overflow] is 'visible', and this also applies to the root 'svg' element; however, for child elements of an SVG document, SVG's user agent style sheet overrides this initial value and set the 'overflow' property on elements that establish new viewports (e.g., 'svg' elements), 'pattern' elements and 'marker' elements to the value 'hidden'. ]] Which seems better to you? Regards- -Doug Schepers W3C Team Contact, SVG and WebApps WGs
Received on Tuesday, 23 September 2008 13:04:25 UTC