ISSUE-2441: Intrinsic sizing and percentage values for inline svg in html

Intrinsic sizing and percentage values for inline svg in html

Raised by:
Erik Dahlström
Opened on:
As shown in the current wording for how the svg viewport is computed (see intrinsic sizing[1]) for inline svg in html is not describing what implementations actually do. I'm raising this issue for SVG2, but this should perhaps be errata'd for SVG 1.1 as well.

This makes a big difference in certain cases, see e.g testcase[2]. For that testcase these are the results:
opera: 400x100, 400x200
chrome: 400x200, 400x200
firefox: 400x100, 400x100
ie9: 400x150, 400x200

Some informal discussion on the issue:
<ed> jwatt: seems to indicate that firefox diverged from the svg spec, could you provide some updated wording such that it would describe what you implemented?
<jwatt> ed: "treat the width/height attributes as presentation attributes, but only if they are explicitly set"
<jwatt> ed: which is much closer to what other implementations do that what we used to do
<jwatt> ed: comment 26 and 27 explain the rational for the "only if explicitly set" part
<ed> jwatt: ok, hmm... we probably will need to revise that part of the spec then, and we do have the "promote-attributes-to-presentation-attributes" spec to do, which does make width/height presentation attributes
<jwatt> ed: yeah
<jwatt> ed: and just to be clear, this is only for outer-<svg>
<ed> jwatt: it applies no matter how the svg was included, or only in the inline-svg-in-html case?
<ed> ... e.g <img src="some.svg"> where the svg had some percentage width/height values
<jwatt> ed: I think in our case it affects the computed style on outer-<svg> in all cases, but we still special case root-<svg> as required by the spec
<jwatt> so that the default (no width/height) is to fill the viewport

Related Actions Items:
Related emails:
  1. Re: Inline SVG sizing in CSS (from on 2013-10-14)
  2. minutes, Seattle/Paris SVG WG F2F Day 1 (from on 2012-07-23)
  3. minutes, 22 March 2012 SVG WG telcon (from on 2012-03-23)
  4. agenda, 22 March 2012 SVG WG telcon (from on 2012-03-22)
  5. Agenda, 15 March 2012 SVG WG telcon (from on 2012-03-14)
  6. SVG-ISSUE-2441: Intrinsic sizing and percentage values for inline svg in html [SVG 2] (from on 2012-03-14)

Related notes:

Opera (Presto 2.11.339) changed to implement width/height mapped as "presentation attributes" for sizing negotiations,

Erik Dahlström, 23 Jul 2012, 15:29:10

Display change log ATOM feed

Dirk Schulze <>, Chair, Chris Lilley <>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <>.
$Id: 2441.html,v 1.1 2020/01/17 13:22:01 carcone Exp $