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: Fri, 15 Jul 2011 13:54:57 +1200
Message-ID: <CAOp6jLY7reKhoLPH8H0bM24u2Yee4K10MAFAx32V6zmhO-y7kw@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
On Fri, Jul 15, 2011 at 8:55 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Wed, Jul 13, 2011 at 9:40 PM, Robert O'Callahan <robert@ocallahan.org>
> wrote:
>
> > 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.
>
> Your last line is intriguing.  Do you mean that, if you have a
> document like this:
>
> foo.svg
> <svg>
>  <rect id=foo fill=blue />
> </svg>
>
> ...that you could do url(foo.svg#foo) and get a blue rectangular image?
>

Sure, that's what element(foo) would do.

I'm not sure how that would work with non-rectangular elements.


Whatever element(foo) would do for non-rectangular elements. I think we
currently use the SVG bounding box as the image bounds.

SVG
> already has a good way to handle this, via the <view> element, as it
> explicitly establishes a viewport.  I'm somewhat more comfortable
> limiting myself to just letting svg documents reference paint servers
> and <view> elements directly.
>

That doesn't seem necessary or even particularly helpful from an
implementation point of view, once you've implemented element().

Also, it would mean that doing url(foo.html#bar) means you have to
> load up the linked document, running scripts/etc. as if you were
> loading an iframe, before you were able to extract out the element.
> Still slightly uncomfortable with this.
>

We don't run scripts in external resource documents. External resource
documents already exist, so what's the new problem here?

Rob
-- 
"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 Friday, 15 July 2011 01:55:24 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:42 GMT