Re: Applying SVG properties to non-SVG content

On Wed, 09 Jul 2008 01:00:46 +0200, Robert O'Callahan <robert@ocallahan.org> wrote:

> I've implemented some experimental features for applying SVG effects to
> HTML. In particular, SVG 'filter', 'clip-path', and 'mask' properties are
> made applicable to non-SVG content and SVG paint servers can be used as CSS
> backgrounds. These are described with examples in my blog:
> http://weblogs.mozillazine.org/roc/archives/2008/06/applying_svg_ef.html
> http://weblogs.mozillazine.org/roc/archives/2008/07/svg_paint_serve.html
> There are also links to experimental Firefox builds supporting these
> features.
>
> I've written up a draft specification for these features:
> http://people.mozilla.com/~roc/SVG-CSS-Effects-Draft.html

On extending the filter, mask and clip-path properties:
- The interaction (and rendering order) between css 'clip'[1] and svg clip-path and mask needs to be defined  

> I'd greatly appreciate any comments. One thing I'm not sure about is where
> this specification should live. 

I'd be happy to include the 'filter' property stuff into the SVG 1.2 filter module[2], but I'm not sure if that'd be more of a recommendation for how the host language (html/css) should define it.

> Obviously it's right in between two working
> groups :-). 

Well, between two or three working groups even, depending on how you want to see it.

> Another thing I'm interested in resolving is how we should
> expose these in Gecko releases; using a vendor prefix would be more annoying
> than usual because I've created no new properties here (in fact, no new
> syntax at all).

Yes, this is awkward. Is there any way in css to test for support of a particular property on a particular element? I guess something similar to the svg <switch> element would have been quite handy.

> One thing that's obviously missing here is transformations. I don't think
> there's any value in linking to SVG for those. 

Unless you want to animate the transform I suppose. 

> Instead I support CSS-based
> transformations like Apple's proposal (at least its 2D subset). (In fact
> someone is actually working on implementing that for Gecko.)

Applying transforms from css on svg content would be interesting, I agree.

Cheers
/Erik

[1] http://www.w3.org/TR/CSS21/visufx.html#clipping
[2] http://www.w3.org/Graphics/SVG/WG/wiki/Filters

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

Received on Friday, 11 July 2008 14:10:09 UTC