W3C home > Mailing lists > Public > www-style@w3.org > October 2012

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sat, 27 Oct 2012 12:43:45 +0200
Message-ID: <CAAWBYDCkznf=cTOkf6kG0vTwuPDq3D85SFdZq1MR0E5o3_V7GA@mail.gmail.com>
To: robert@ocallahan.org
Cc: Dirk Schulze <dschulze@adobe.com>, www-svg <www-svg@w3.org>, www-style <www-style@w3.org>
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:34 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT