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

Re: Data IRIs in pint references.

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 20 Nov 2013 15:50:40 -0800
Message-ID: <CAAWBYDD4-qG--_zK781drcz-zbHXQTvNQYzV2vJciUMLk-c==g@mail.gmail.com>
To: Paul LeBeau <paul.lebeau@gmail.com>
Cc: www-svg <www-svg@w3.org>
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 Wednesday, 20 November 2013 23:51:27 UTC

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