W3C home > Mailing lists > Public > www-svg@w3.org > November 2013

Re: Automatic centering and positioning

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 10 Nov 2013 09:13:22 -0800
Message-ID: <CAAWBYDBOaZ9UXQC-smK-Rn9J4tnGmXNiJhybiG1eoGB3ARhjdA@mail.gmail.com>
To: Paul LeBeau <paul.lebeau@gmail.com>
Cc: Alex Bell <alex@bellandwhistle.net>, www-svg <www-svg@w3.org>
On Fri, Nov 8, 2013 at 4:09 PM, Paul LeBeau <paul.lebeau@gmail.com> wrote:
>> I'm all for authoring convenience, but mutual centering is achievable in
>> Illustrator (for example)
> That's true, but there are a *lot* of people using SVG now that aren't
> working with preconstructed documents.  A majority of the SVG questions on
> Stack Overflow are related to SVG generating libraries such as D3.js or
> Raphaƫl.  They are creating graphs or infographics at runtime.
> I am open to the idea that CSS can be a solution to this, but curious what
> sort of layout mode Tab et al are thinking about.

CSS has alignment properties for aligning children within a container.
 For a single child, they allow you to align against either side of
the container, or centered in either dimension.

> What I guess I was thinking was something like a new property
> "relative-position" that takes a <funciri> and an <dx> and <dy> and applies
> a translate transform based on the two objects' bounding boxes.  It would
> need to allow for positioning relative to right and bottom edges - not just
> left and top. And also would need a mechanism to deal with circular
> dependencies etc.

This is something that shouldn't be SVG-specific.  I plan to address
this in the CSS Positioning spec, but that still requires us to
actually define SVG's layout model in terms that are compatible with
CSS's layout models.

Received on Sunday, 10 November 2013 17:14:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:47 UTC