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

On Wed, May 18, 2011 at 11:59 AM, Rik Cabanier <cabanier@gmail.com> wrote:
> On Wed, May 11, 2011 at 4:00 PM, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>> Right now, the Filters spec defines the CSS syntax with a very
>> simplistic mapping into SVG - every function is normatively defined by
>> a simple <filter> that takes the entire source element as input.  This
>> means that the functions themselves don't specify their input, as they
>> all take a single source image.
>>
>> This is mostly fine when you're doing the sorts of things that the
>> 'filter' property is meant to do.  It's a problem, though, when you
>> want to reuse these cool effects (like sepia(), blur(), invert(),
>> etc.) on images in CSS for use in backgrounds or other places.  I'd
>> like to see these filter functions also defined in a way that allows
>> one to apply them to <image> values.
>>
>> I'm not sure what the best way to go about this is.  A
>> minimal-disruption route would be to define new <image> values with
>> functions of the same name that take an <image> argument in addition
>> to their existing arguments.  I could do this in Image Values 4,
>> perhaps.
>
> wouldn't it be easier if there was a 'background-filter' keyword?

Not really.  Backgrounds are only one of five places we currently use
images (content, background-image, list-style-image, border-image,
cursor).  All of these are potentially useful to filter.

~TJ

Received on Wednesday, 18 May 2011 21:48:19 UTC