Re: [css4-images] support for SVG Paint Servers without element()

On Oct 23, 2012, at 2:17 PM, Robert O'Callahan <robert@ocallahan.org> wrote:

> On Sun, Oct 14, 2012 at 2:51 PM, Dirk Schulze <dschulze@adobe.com> wrote:
> As conclusion, I wonder why CSS4 Images can't support SVG fragment identifiers directly:
> 
> background-image: url(image.svg#gradient1);
> 
> The code paths to load an SVG document as an image and an SVG document to provide an external resource such as a paint server are quite different, in Gecko at least. We need to know when we start loading the document which situation we're in. With your syntax, we can't know until the document is loaded. We use the presence of element() to signal that we're in the external resource situation.

This leads to signification issues with CSS Masking. The 'mask' property is a shorthand property for 'mask-image' and therefore takes an CSS Image. But it can have a reference to a mask element too.

IMO, the same situation in multiple cases. And special casing all that in CSS specifications seems to be extremely hacky and complicated for web authors to remember. Just an example:

fill: url(something);  /* reference to a paint server */
fill: element(something) /* reference to CSS Image */

background-image: url(something) /* reference to CSS  Image */
background-image: element(something) /* reference to a paint server */

The opposite way on two different properties with similar goals.

Do you have a proposal how to do it on CSS Masking without breaking the implementations on WebKit and Firefox?

Greetings,
Dirk

> 
> Rob
> -- 
> “You have heard that it was said, ‘Love your neighbor and hate your enemy.’ But I tell you, love your enemies and pray for those who persecute you, that you may be children of your Father in heaven. ... If you love those who love you, what reward will you get? Are not even the tax collectors doing that? And if you greet only your own people, what are you doing more than others?" [Matthew 5:43-47]
> 

Received on Thursday, 25 October 2012 22:43:06 UTC