W3C home > Mailing lists > Public > www-style@w3.org > July 2011

Re: [css3-images] Using SVG Paint Servers as <image>

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 14 Jul 2011 16:40:02 +1200
Message-ID: <CAOp6jLZvMvJk78LybDP7EBUqY2zDyWP=9DY3ArC4sZhARq31ow@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
On Thu, Jul 14, 2011 at 1:13 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> Second, how should paint servers be referenced?  In roc's old code,
> you simply used url(), with the fragment pointing to the paint
> server's id.  More recently, though, roc has suggested using
> element(), extending it to take a url.  I'm not so much a fan of this
> latter solution; for one, it's confusing to have both an idselector
> and a url with a fragid, as they'll refer to different things -
> element(#foo) refers to the element with id=foo in the host document,
> while element("#foo") would refer to the element with id=foo in the
> CSS document (which wouldn't refer to anything at all if the CSS was
> external).  Also, would this then mean that you could reference
> arbitrary elements from external pages (presumably same-origin
> restricted)?

Yes, you can in Firefox at the moment.

I've come full circle on this, in a way. I now think that unifying CSS
images and SVG paint servers completely would be great, in which case since
url(foo.svg#pattern) is a valid SVG paint server, it should also be a valid
CSS image with the equivalent meaning. I had concerns about compatibility
with other possible uses of fragment references for SVG images, and fallback
behavior for browsers not supporting the feature, but unifying CSS images
and SVG paint servers seems a big enough win to just go ahead.

I agree that for CSS images we can just have element(id) refer to the
element with that id in the host document (or the anonymous element map). I
think element(id) and url(#id) should behave the same whenever they refer to
the same element.

"If we claim to be without sin, we deceive ourselves and the truth is not in
us. If we confess our sins, he is faithful and just and will forgive us our
sins and purify us from all unrighteousness. If we claim we have not sinned,
we make him out to be a liar and his word is not in us." [1 John 1:8-10]
Received on Thursday, 14 July 2011 04:40:38 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:47 UTC