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

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

From: L. David Baron <dbaron@dbaron.org>
Date: Tue, 1 Nov 2005 15:34:47 -0800
To: www-svg@w3.org
Message-ID: <20051101233447.GA15198@ridley.dbaron.org>
On Tuesday 2005-11-01 16:57 -0600, Boris Zbarsky wrote:
> Jon Ferraiolo wrote:
> >    * CSS-compatible width properties [see CSS2-VISUDET] or
> >corresponding XSL properties are specified on the referencing element
> >(or rootmost 'svg' element for inline SVG content).
> This one is not as good, I think.  For example, say I have:
>   <svg:svg style="height: 100px" width="50" height="50"/>
> In this case, the viewport will be 50px wide and 100px tall per the spec 
> as written, whereas I think it's pretty clear that rendering it 100px 
> wide by 100px tall would be vastly preferable in this case (this is how 
> HTML images work, for example -- if only one dimension is specified, 
> they're scaled in a way that preserves the aspect ratio).

Unless the markup you've written is shorthand for having the width and
height attributes inside the SVG and the style attribute on the element
that includes it, I don't think the analogy to HTML images holds.  After
all, in HTML,

  <img src="image.gif" style="height:100px" width="50" height="50">

will be 50px wide and 100px tall.  I don't see a reason they should
interact differently in cases where they're all specified on the same


L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

Received on Tuesday, 1 November 2005 23:35:03 UTC

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