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

(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.

)


Cheers,
Kenny
-- 
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