Re: Automatic centering and positioning

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.

~TJ

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