Re: [filters] Reusing filter functions as <image>s in CSS

On 20/05/2011, at 2:57 AM, Tab Atkins Jr. wrote:

> On Thu, May 19, 2011 at 12:05 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> On May 18, 2011, at 11:43 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>>> On Wed, May 18, 2011 at 7:48 PM, Robert O'Callahan <robert@ocallahan.org> wrote:
>>>> How about a new image value "filter(image, list of filters)"?
>>> 
>>> Why didn't I think of that?  That's a pretty good answer.
>> 
>> In addition to a filter property?
> 
> The 'filter' property takes, as its original input, the element
> itself.  The filter() function instead takes the passed image as the
> original input.
> 
> Using filter() instead of 'filter' would require some way to refer to
> the element itself as an image (not necessarily a blocker - we already
> have element() which does basically this), and some probably-confusing
> interaction with 'content', like:
> 
> .blur-me {
>  content: filter(contents, blur(5px));
> }
> 
> Animating filters would then require that 'content' itself be
> animatable, which may or may not be weird.

I'd like to keep it as a simple 'filter' property applying to the element, rather than a content thing. It's so basic that it is easily understood.

I agree that the filter() function is also useful for generating images.

Should this new function be defined in the Filters spec, or the Images spec?

Dean

Received on Thursday, 19 May 2011 23:39:55 UTC