W3C home > Mailing lists > Public > public-fx@w3.org > April to June 2011

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 18 May 2011 14:47:32 -0700
Message-ID: <BANLkTimHykWRdkv+bTMWMkuhju+sXv+ymQ@mail.gmail.com>
To: Rik Cabanier <cabanier@gmail.com>
Cc: public-fx@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 18 May 2011 21:48:20 GMT