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

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 UTC