[whatwg] Including HTML more directly into SVG

Tab Atkins Jr. jackalmage at gmail.com
Tue Sep 11 11:34:55 PDT 2012


On Tue, Sep 11, 2012 at 11:29 AM, Elliott Sprehn <esprehn at gmail.com> wrote:
> On Tue, Sep 11, 2012 at 9:09 AM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
>> ...
>>
>>> The paragraph and span concept in SVG
>>> wouldn't be the same thing so it's not an antipattern. You would have
>>> to specify some kind of x/y coordinate and the width since SVG doesn't
>>> have a flow concept so there would be nothing to size or place
>>> against.
>>
>> No, all you have to do is define SVG positioning as being a slight
>> diff from absolute positioning.  Then all the sizing just falls out.
>
> Can you explain this? I don't understand how we decide the width of an
> html element as the containing block is the <svg> element. Are you
> saying we default to shrink wrap?

You just explained it.  The containing block is the nearest ancestor
<svg> element.  Everything else works as normal.

> Also, how does your proposal address
> flowing text inside of a <path>?

That's a good question!  Presumably you mean that, for example, one
might want to have emphasized text in a text-along-a-path flow?  I
suppose it should be as easy as making them children of a <textPath>,
and setting "display:svg" to make them obey SVG rendering rules rather
than the CSS box model.

> A strawman of the JSON spec rewritten with your proposal would be useful.

I don't understand this request.

~TJ



More information about the whatwg mailing list