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

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.

> 
>> 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.

Greetings,
Dirk

> 
> ~TJ

Received on Sunday, 26 October 2014 06:07:38 UTC