Re: HTML5 and SVG

On Saturday 2010-07-17 08:53 +1000, Alex Danilo wrote:
> Are you aware of the work done by the Compound Documents Format (CDF)
> working group (now defunct).
> 
> It was formed to address these sort of issues when trying to mix different
> namespaces in XML. That work predates the HTML5 effort but it did include
> representatives of most of the browser vendors.

It's also worth noting that a bunch of the requirements that browser
vendors brought up in discussions in CDF actually ended up being
addressed by clarifications in other specs.  In particular, a bunch
is specified in HTML5 and in CSS 2.1 that was not specified then.

In particular, for this case, I think the sizing behavior for
SVG-in-HTML is pretty clearly defined by sections 10.3.2 and 10.6.2
of CSS 2.1:
http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width
http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height
and by the SVG specification, probably most importantly:
http://www.w3.org/TR/SVG11/coords.html#ViewportSpace

Since the *svg* element defaults to width="100%" and height="100%",
the size of the svg element in this case is defined by the behavior
of percentage widths and heights in CSS, and then the size of the
rect follows from that according to the rules in the SVG spec.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Friday, 16 July 2010 23:32:19 UTC