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

Re: [css-images] Reference SVG paint servers with url()

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 26 Oct 2014 00:14:37 -0700
Message-ID: <CAAWBYDCneXwiuSY0HMXFxLU4-zTD-eK=mgrEvy-dx9PY8-c=bA@mail.gmail.com>
To: Dirk Schulze <dschulze@adobe.com>
Cc: www-style list <www-style@w3.org>
On Sat, Oct 25, 2014 at 11:07 PM, Dirk Schulze <dschulze@adobe.com> wrote:
> On Oct 25, 2014, at 5:47 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> On Fri, Oct 24, 2014 at 10:50 PM, Dirk Schulze <dschulze@adobe.com> wrote:
>>> I would like to suggest that it is possible to reference SVG paint servers like <pattern>, <linearGradient> or <radialGradient> with url() and that this get added to the specification.
>>>
>>> The ‘fill' and ‘stroke' properties are the first properties to support references of SVG paint servers with url(). Both got extended in SVG2 to match the syntax of the ‘background’ shorthand property and therefore support CSS images as well.
>>>
>>> A recent change of SVG image handling, where an SVG document won’t be able to load further sub resources, solves the cross origin issue we had before.
>>>
>>> In WebKit we experimented with this way to reference SVG paint server resources and the result looks promising.
>>
>> So you solved the "images and resources use different code paths"
>> problem?  That's what was blocking us before.
>
> Yes, we did. Both use a similar code path in our experiment. More important, they have the same requirements for fetching.

Cool!

>>> One difference to normal CSS Images: SVG paint servers are potentially infinite in size and won’t be clipped, repeated or sized by other properties. I could imagine to have special behaviors when referenced with element() or image().
>>
>> They're no different than CSS gradients.  They'll still respond to CSS
>> giving them a box of a certain size to fill; they just don't scale
>> with the box size, like CSS gradients do.  They will definitely clip
>> or repeat when CSS wants them to, such as in a 'background' property.
>
> On a 'per property’ decision might work. Will check. For fill an stroke there must be no clipping.

'fill' and 'stroke' both use concrete sizes that are equal or larger
than the visible area, so there's nothing to (visibly) clip.

~TJ
Received on Sunday, 26 October 2014 07:15:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:25 UTC