W3C home > Mailing lists > Public > www-style@w3.org > October 2013

Re: [filter-effects] filter different components of an element

From: Kang-Hao (Kenny) Lu <kanghaol@oupeng.com>
Date: Fri, 11 Oct 2013 19:44:13 +0800
Message-ID: <5257E48D.2070409@oupeng.com>
To: Dirk Schulze <dschulze@adobe.com>
CC: Brad Kemper <brad.kemper@gmail.com>, Lea Verou <lea@verou.me>, WWW Style <www-style@w3.org>, 张 金龙 <jinlongz@oupeng.com>
(2013/10/11 19:31), Dirk Schulze wrote:> Well, with the filter function
> you have opacity(). It might be some kind of violation of this
> feature, but well:
> background-image: filter(image.png, opacity(0.5));

The requirement is that you don't know "image.png" or perhaps you are
uncomfortable repeating 'background-image: filter(image.png,
opacity(0.5));' in style sheet A while you don't have write access to
style sheet B with 'background-image: image.png'. As I said, I don't
know how common this is though.

(I was using 'background-opacity' in my example because I don't feel
like coming up with a syntax, but I guess this is confusing. Here you go:

  * {
    color: blue;
    filter: opacity(0.3);
    filter-target: background;

 :root {
    background-color: black;
    filter: none;

Not that I like this property name though.


Web Specialist, Opera Sphinx Game Force, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/
Received on Friday, 11 October 2013 11:44:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:03 UTC