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

'image' and 'foreignObject' with 'viewBox' attribute?

From: Dirk Schulze <dschulze@adobe.com>
Date: Sat, 14 Apr 2012 15:28:08 -0700
To: SVG public list <www-svg@w3.org>
Message-ID: <48976C76-CEA1-4E66-AA57-C7BCFCED4E8D@adobe.com>

The section "7.7 The ‘viewBox’ attribute"[1] has the following definition: "All elements that establish a new viewport (see elements that establish viewports), plus the ‘marker’, ‘pattern’ and ‘view’ elements have attribute ‘viewBox’."

Elements that establish viewports are [2]:
	• The ‘svg’ element
	• A ‘symbol’ element define new viewports whenever they are instanced by a ‘use’ element.
	• An ‘image’ element that references an SVG file will result in the establishment of a temporary new viewport since the referenced resource by definition will have an ‘svg’ element.
	• A ‘foreignObject’ element creates a new viewport for rendering the content that is within the element.

Therefore the specification demands that 'foreingObject'[3] as well as 'image'[4] (referencing an SVG file) should allow the attribute 'viewBox'. But none of the element definitions allow the attribute 'viewBox'.

Actually just 'svg' and 'symbol' seem to have the 'viewBox' attribute beside 'marker', 'pattern' and 'view'. Maybe they should be listed individually and the link to "elements that establish viewports" can get removed.


[1] http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute
[2] http://www.w3.org/TR/SVG/coords.html#ElementsThatEstablishViewports
[3] http://www.w3.org/TR/SVG/extend.html#ForeignObjectElement
[4] http://www.w3.org/TR/SVG/struct.html#ImageElement
Received on Saturday, 14 April 2012 22:28:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:28 UTC