Re: Ambiguities in fill:url() / stroke:url() syntax

On Sat, Oct 27, 2012 at 12:26 PM, Robert O'Callahan
<robert@ocallahan.org> wrote:
> Here's an alternative proposal:
>
> Given a url() value in a context whether either an external resource
> reference (e.g. paint server reference) or an image load (e.g. SVG image)
> could be performed,
> a) If the resolved URI uses a Media Fragments URI feature, or the svgView
> feature (http://www.w3.org/TR/SVG/linking.html#LinksIntoSVG), perform an
> image load.
> b) otherwise, if the resolved URI includes a fragment identifier, perform an
> external resource reference.
> c) otherwise, perform an image load.
> URIs in image() values always perform an image load. URIs in element()
> values always perform an external resource reference.
>
> I think this proposal almost always does what the author wants, and is
> compatible with almost all existing usage, while being very simple. The only
> problematic case is that url(foobar.svg#abc) can no longer be used to link
> to a specific element in an SVG file; image(foobar.svg#abc) must be used
> instead. I think the usage of that feature is currently very low and can
> probably be broken, at least if we do it soon.
>
> Some fine-tuning of this proposal could be done. For example we might modify
> step a) to treat any URI with a fragment identifier containing certain
> characters (e.g. '=', '(', ')') as an image load, so that Media
> Fragments-like features can be introduced later without potentially changing
> behavior.

I like the shape of it, but use of "SVG Stacks" (linking to a fragment
and using :target, to allow image spriting in SVG) is growing, so we'd
have to do it *very* fast.

~TJ

Received on Saturday, 27 October 2012 10:44:39 UTC