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

Another proposal came from Stephen Zilles during the CSS F2F meeting today. I want to list it beside the different proposals.

He suggests not doing any heuristics, but follow a predefined default behavior. 'fill', 'stroke', 'mask', 'clip-path' always assume that fragments (which are no media fragments) are treated as resources. For all other properties, they are treated as images.

For CSS Masking that would mean:

	mask: url(image.svg#id) is assumed to be a mask resource. At least if it is the only reference. If it has more than one list item, it is treated as image again.

	mask-image: url(image.svg#id) is assumed to be an image, since the property, by default, takes CSS Images.

Greetings,
Dirk

On Oct 29, 2012, at 1:28 PM, Karl Dubost <karld@opera.com> wrote:

> 
> Le 27 oct. 2012 à 06:26, Robert O'Callahan a écrit :
>> 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, 
> 
> Naïvely, what about a meta, attribute of whatever flag inside the svg file saying something along: 
> 
> *        "This SVG file is a stack of icons.".
> * and/or "This element is a a stacked icon."
> 
> 
> Below non prescriptive syntax, just to illustrate.
> 
> <svg id="icon" 
>     class="icon" 
>     version="1.1" xmlns="http://www.w3.org/2000/svg"   
>     xmlns:xlink="http://www.w3.org/1999/xlink"
> 
>     role="iconstack">
> 
> […]  
>   <svg viewBox="0 0 16 16">
>      <g id="chart" class="icon">[…]</g>
>   </svg>
>   <svg viewBox="0 0 16 16">
>      <g id="plus" class="icon">[…]</g>
>   </svg>
> </svg>
> 
> 
> 
> 
> and/or 
> 
> 
> 
> <svg id="icon" 
>     class="icon" 
>     version="1.1" xmlns="http://www.w3.org/2000/svg"     
>     xmlns:xlink="http://www.w3.org/1999/xlink">
> […]  
>   <svg viewBox="0 0 16 16" 
> 
>        role="icon">
> 
>      <g id="chart" class="icon">[…]</g>
>   </svg>
>   <svg viewBox="0 0 16 16" 
> 
>        role="icon">
> 
>      <g id="plus" class="icon">[…]</g>
>   </svg>
> </svg>
> 
> 
> 
> -- 
> Karl Dubost - http://dev.opera.com/
> Developer Relations, Opera Software
> 

Received on Monday, 29 October 2012 21:49:31 UTC