Re: [filter-effects] apply filter to border and background

On Aug 17, 2012, at 10:02 AM, Tab Atkins Jr. <> wrote:

> On Thu, Aug 16, 2012 at 6:09 PM, Dirk Schulze <> wrote:
>> Hi CSS folks,
>> I created an initial Wiki page for discussing a request of the CSS WG to support filter effects on just backgrounds or just borders as well. [1]
>> I want to collect proposals as well as pros and cons to find the best decision to address this request.
>> a) The first proposal is adding new properties for background and border:
>> * 'background-filter'
>> * 'border-filter'
>> These properties have the same syntax and semantic as the 'filter' property.
>> The benefit that I see is that you can apply different filters to different component of an element (border, mask or content). But it means adding two new properties.
>> b) The second proposal is adding a new keyword to Filter Effects named 'filter-target' with the keywords
>> * border
>> * background
>> * group
>> * (content)
>> 'content' might not be necessary, since you can group child elements and filter the whole group.
>> The benefit is that we just need one new property that is defined within Filter Effects and without modification of CSS Backgrounds and Borders.
>> It seems to be harder to define different filters to different components (filter1 on the border, filter2 on the background).
>> SVG may also apply filters on different components of a shape. This could be done with the SVG Vector Effects proposal [2]. The 'filter' property would just be applied to each single vector effect.
>> Greetings,
>> Dirk
>> [1]
>> [2]
> Brad Kemper's old proposal from the 2009 TPAC was to accompany each
> filter with a list of keywords representing filterable sub-parts of
> the element, and the filter would be applied to the union of those
> subparts.
> I think his pieces were [ [ border || background || text ] | all ],
> with filters assuming "all" if not otherwise specified.  Brad can
> correct me with pointers to his old proposal, though.
That sounds basically like idea b) (with extending the shorthand filter). But it would also mean that you can just apply one filter to different components and not different. Note that this is a general decision that we need to address for other and future specifications as well (like compositing and masking).


> ~TJ

Received on Friday, 17 August 2012 20:40:29 UTC