W3C home > Mailing lists > Public > www-svg@w3.org > November 2005

Re: [SVGT 1.2] Question on sizing of the outermost <svg>

From: Jon Ferraiolo <jonf@adobe.com>
Date: Tue, 1 Nov 2005 03:51:45 -0800
Message-ID: <6ECA24BE410D994496A2AE995367C5C83019A4@namail3.corp.adobe.com>
To: "Boris Zbarsky" <bzbarsky@MIT.EDU>, <www-svg@w3.org>

This is the official response from the SVG Working Group. We have
modified the specification to address your comments. In particular:

* The reference has been changed to chapter 10 of the CSS spec
* The spec has been clarified to make sure that it is clear that
specified CSS properties for width and height take precedence over
'width' and 'height' attributes on the root 'svg' element
* The spec has been clarified to say that CSS properties for width and
height also apply to inline embedded SVG content within a parent
document which is styled by CSS.

Please reply to this mail within two weeks if these changes do not
address your concerns.



At 01:15 PM 5/9/2005, Boris Zbarsky wrote:

>I have a question about the sizing of outermost <svg> elements.
>In section 7.2 [1], the specification says:
>   The width attribute on the 'svg' element establishes the viewport's
>   width, unless the following conditions are met:
>     * the SVG content is a separately stored resource that is embedded
>       by reference (such as the 'object' element in [XHTML]), or the
>       SVG content is embedded inline within a containing document;
>     * and the referencing element or containing document is styled
>       using CSS [CSS2] or XSL [XSL];
>     * and there are CSS-compatible positioning properties [ CSS2-POSN]
>       specified on the referencing element (e.g., the 'object'
>       or on the containing document's 'svg' element that are
>       to establish the width of the viewport.
>Here "[CSS2-POSN]" is a link to the Visual Formatting Model chapter 
>(chapter 9) of CSS2.  Unfortunately, the "width" property in CSS2 is in

>the "Visual formatting model details" chapter (chapter 10).

Thanks for pointing this out. This incorrect reference has been in the
spec forever. The guy who edited the SVG 1.0 spec screwed up. (Guess who

that was.) I believe the correct reference should be to chapter 10, as
say: http://www.w3.org/TR/REC-CSS2/visudet.html.

>This leaves me unsure as to whether an outermost <svg:svg> element in
>XHTML document styled with "width: 100px" and having width="50px" as an

>attribute should be 100px wide or 50px wide.  I'm assuming the intent
>that it should be the former, right?  It may be worth adjusting the
>to make that clearer.

Yes, the former.

>Further, there is the question of interaction with the CSS display 
>property, since per CSS width/height do not apply to display:inline 
>non-replaced elements.  I guess the intention is that <svg:svg> should 
>essentially be a replaced element in CSS terms?  That is, with the
>display value of "inline" the specified values of width and height
>affect the computed width and height?  That would make some sense to
>since a CSS renderer can't really do anything with an <svg:svg> other
>reserve space for its desired size in the CSS box model...

Yes, that makes sense to me: compute the width/height of an inline
element following the rules for CSS inline, replaced elements.


>[1] http://www.w3.org/TR/SVGMobile12/coords.html#InitialViewport
Received on Tuesday, 1 November 2005 11:53:23 UTC

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