Re: [css3-background] possibly too late for last call, but: background-opacity?

2009/10/16 Robert O'Callahan <robert@ocallahan.org>

> Out of all the ideas presented so far, new image functions sound best to
> me, e.g.
> background-image: image-opacity(url(foo.png), 0.3);
> background-image: image-offset(url(foo.png), 100, 0);
> background-image: image-rect(url(foo.png), 100, 0, 100, 200);
>
> These are animatable with transitions, compose well and don't require
> changes to CSS fundamentals.
>

Not that well, actually.

1) You need to repeat the URI every time, and you cannot cascade
independently the image and its opacity.
2) You cannot use that for "drop-shadow" (because the drop-shadowed
border-image would be clipped, making it no better than Photoshop)
3) You cannot use that for content-only effects (unless you hack "content")


>
> For arbitrarily complicated stuff, I recommend SVG filters with additional
> named source images representing the CSS components of the source element.
> We probably need to figure out a mechanism so that filters can be
> parameterized with CSS values though --- both for ease of reuse and easy
> animation. Something like
> filter: url(effects.svg#LSD), 10, 10, 2;
>
> effects.svg contains
>   <feOffset in="CSSBackground" x="$1" y="$2"/>
>   <feColorMatrix type="hueRotate" values="$3"/>
>
>
There's an SVG Param spec on the filter side, we only need syntax on the CSS
side. But I would object to that use of comma, I believe there are use-case
for multiple filters.

Besides, we still need to define the processing of "filter" in the CSS
realm. We may go with "what mozilla currently does" or "what's more
SVG-like" or "what's more author-friendly". We may need to think of the IE
side of "filter" too.


> Rob
> --
> "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
> 53:5-6]
>

Giovanni

Received on Saturday, 17 October 2009 15:28:09 UTC