Re: Targetting Filter Effects

On Tue, Oct 13, 2009 at 1:32 PM, fantasai <>wrote:

> I'm looking at the things coming into www-style, and there's
> a class of them that are all about filter effects: shadows,
> opacity, and the like. roc had proposed using the SVG 'filter'
> property to expand the range of filters beyond shadows and
> opacity. I think that's a great idea. But the problem we have
> here is targetting different aspects of the box. We've got
> requests for targetting:
>  - the entire element, composited
>  - the border layer only
>  - the background layer only
>  - individual background layers
>  - the backdrop only (border + backgrounds)
>  - the composited content of the element minus the backdrop
> I might even be missing some combinations here. Problem is,
> that we're going to look at a property explosion if we try
> to address these separately. Nevermind the overhead, it's
> going to be a hard-to-control cascading mess if that happens.
> And the alternative of stuffing them all into one comma-
> separated property is unweildy for other reasons. (Plus it
> won't be able to address individual background layers, if we
> decide to address that.)

One possible solution is to define SVG filter images that correspond to
different parts of the rendered element. See the description of 'in' here:

In our implementation of SVG filters for HTML I made 'SourceAlpha' and
'SourceGraphic' refer to the entire element, and that definitely makes the
most sense IMHO. But we could add 'CSSBorder', 'CSSBackground', 'CSSOutline'
and 'CSSContent' to refer to the borders, backgrounds, outline and "other
content" of the element. We could even add 'CSSBackground-0',
'CSSBackground-1' etc to access individual background layers. It's fairly
easy to use feComposite or feMerge to composite together multiple filter
images. It would also be easy to add new image names for common combinations
(e.g. 'CSSBorderBackground').

We would have to define exactly what CSSBackground and CSSBorder means, it's
not obvious especially for tables with collapsed borders.

"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah

Received on Tuesday, 13 October 2009 01:18:48 UTC