Changes

Jump to: navigation, search

SVG:Sizing

No change in size, 14:57, 19 January 2011
m
typo fix: s/affect/effect/
<h2>SVG width/height vs. CSS width/height</h2>
The affect effect of the CSS properties is reasonably well defined. An important question to answer is, what part do the SVG 'width', 'height' and 'viewBox' attributes play, and how do they interact with the CSS properties? It has [http://www.w3.org/TR/SVGMobile12/coords.html#InitialViewport become clear] that SVG is to be treated as a [http://www.w3.org/TR/CSS21/conform.html#replaced-element replaced element] in CSS contexts. It has also become clear that the intrinsic dimensions that the SVG must pass to the [http://www.w3.org/TR/CSS21/visudet.html CSS replaced element algorithms] are to [http://www.w3.org/TR/SVGMobile12/coords.html#IntrinsicSizing come from the SVG 'width', 'height' and 'viewBox' attributes]. However, current implementations (e.g. Opera 9.23) appear to treat the 'width' and 'height' attributes as [http://www.w3.org/TR/SVG11/styling.html#AlternativesForStyling presentation attributes] and map them into style (i.e. [http://www.w3.org/TR/CSS21/cascade.html#preshint translate them directly to CSS 'width' and 'height' properties]). As it turns out, there are problems with both these approaches, and unfortunately the new text specifying SVG as a replaced element creates some horrible authoring gotchas (as currently worded).
goes against the letter of the specification, but actually honors the intent behind the letter.
Confirm
489
edits

Navigation menu