W3C home > Mailing lists > Public > www-svg@w3.org > September 2011

Re: bounding box of inline SVG

From: Rik Cabanier <cabanier@gmail.com>
Date: Mon, 12 Sep 2011 10:41:53 -0700
Message-ID: <CAGN7qDAriPDKM80mMN6L=2Za80XXaRoLyGMPMOT9t4_a9VEzEw@mail.gmail.com>
To: Alex Danilo <alex@abbra.com>
Cc: www-svg <www-svg@w3.org>
inline SVG is part of the HTML document so it could be calculated by looking
at the size of its container.
Basically, it would just follow the same rules as regular HTML elements
(including how percentages are calculated if an ancestor has a CSS


On Sun, Sep 11, 2011 at 10:51 PM, Alex Danilo <alex@abbra.com> wrote:

> Hi Rik,
> --Original Message--:
> >All,
> >
> >If you use inline SVG, you still need to define the width and height of
> each block of inline SVG.
> >Could the spec be changed so that this is calculated automatically?
> >The browser sees all the graphics in the DOM, so it could do this with not
> too much effort. This would make it easier to draw and manipulate inline SVG
> elements since you won't have to worry about the bbox and viewbox.
> >
> >I seem to remember a discussion on this, but I can't find it any more.
> There have been many discussions about this over the years.
> Lack of an outer <svg> defining width/height falls apart when the graphic
> objects use percentages as units. e.g. <rect width="10%" ...
> Alex
> >Rik
> >
> >
> >
Received on Monday, 12 September 2011 17:42:21 UTC

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