W3C home > Mailing lists > Public > www-svg@w3.org > November 2013

Re: Data IRIs in pint references.

From: Paul LeBeau <paul.lebeau@gmail.com>
Date: Thu, 21 Nov 2013 13:29:39 +1300
Message-ID: <CACfsppBNmjh2qYAGx05SBT+YQuK_f9pH=UCr6Y6Wthyv1MpELQ@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-svg <www-svg@w3.org>
Good point Tab.  With the issues fixed, it works in FF.  As Boris also just
noted.

http://jsfiddle.net/5erBw/4/


Paul




On 21 November 2013 12:50, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Wed, Nov 20, 2013 at 3:40 PM, Paul LeBeau <paul.lebeau@gmail.com>
> wrote:
> > Hi all
> >
> > Since functional IRIs take an IRI reference, just the same as href does,
> is
> > there any particular reason you couldn't supply a paint server in the
> form
> > of a data IRI?
> >
> > For example:
> >
> > <rect width = "100" height = "100"
> >
> fill="url(data:image/svg+xml,%3ClinearGradient%20x1=%220%25%22%20y1=%2250%25%22%20x2=%22100%25%22%20y2=%2250%25%22%3E%3Cstop%20offset=%220%25%22%20style=%22stop-color:rgb(255,255,255);stop-opacity:1;%22%3E%3C/stop%3E%3Cstop%20offset=%22100%25%22%20style=%22stop-color:rgb(0,0,0);stop-opacity:1;%22%3E%3C/stop%3E%3C/linearGradient%3E)"></rect>
> >
> >
> > No browser I've tried supports this, but I'm curious if there is a
> technical
> > or other reason that proscribes it.
>
> Your example data URL is an invalid SVG document, for one. ^_^  To
> work, the data URL would have to be a complete SVG file, with an id on
> the <linearGradient>, and a hash on the url pointing to that element.
>
> ~TJ
>
Received on Thursday, 21 November 2013 00:30:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:47 UTC