W3C home > Mailing lists > Public > public-fx@w3.org > April to June 2011

Re: [css3-images] Defining SVG paint servers as a CSS <image>

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 21 Jun 2011 17:53:12 -0700
Message-ID: <BANLkTinW0vcACkz7asgJJB8ot3TmH=WeEA@mail.gmail.com>
To: Rik Cabanier <cabanier@gmail.com>
Cc: public-fx@w3.org
On Tue, Jun 21, 2011 at 1:56 PM, Rik Cabanier <cabanier@gmail.com> wrote:
> On Tue, Jun 21, 2011 at 1:12 PM, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>> On Tue, Jun 21, 2011 at 12:19 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>> > It would even be better if there was a way that you could refer to a SVG
>> > symbol instead of a paint server.
>> > We're working on converting Flash content to HTML+SVG and if the
>> > animation
>> > is complex, we create many external SVG files.
>> > The size of the SVG files is not a problem but having to do a http
>> > request
>> > for each one causes a lot of overhead.
>> > If we could refer to symbols, we could put all our content in 1 external
>> > file which is much more efficient...
>>
>> That's theoretically doable by just targetting <svg> subelements
>> directly, right?
>
> Correct but it requires JavaScript to make it work.

Hmm, you miss my point.  The ability to refer to a single sub-<svg> of
a larger SVG is part of the spec, right?  I think nobody does it, but
I'll assume for now that it's something that can be fixed.


>> Alternately, it might be doable by a suitable interpretation of
>> <pattern>.  By default, I'd treat a <pattern> as an infinite image
>> constructed from positioning and tiling the contents.  Alternately, we
>> could treat <pattern> as just its contents, and leave the tiling part
>> to CSS.  That would be a bit more magical than I probably want to
>> worry about, though.
>
> Yes, using patterns feels more like a hack.
> I agree that for your proposal, patterns should either not tile or be
> excluded as a paint server.

I was actually saying the opposite - patterns should indeed tile,
because that's how they're defined in SVG.  My definition would just
have them tile into the canvas that CSS uses.  It was the non-tiling
that was hacky and which I didn't want to do.

~TJ
Received on Wednesday, 22 June 2011 00:53:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 22 June 2011 00:54:01 GMT