W3C home > Mailing lists > Public > www-style@w3.org > April 2012

Re: Concern about -webkit-mask

From: Rik Cabanier <cabanier@gmail.com>
Date: Wed, 18 Apr 2012 15:36:39 -0700
Message-ID: <CAGN7qDDSduU0qJbKVSckEgQLFGxvWFiRTv2R1T2cBLpgZfD3OQ@mail.gmail.com>
To: robert@ocallahan.org
Cc: John Daggett <jdaggett@mozilla.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
You're right!
Behavior must have changed in the past year, because when we used
'-webkit-mask-image' to convert animations to HTML last year we had to
explicitly remove the color from the mask to avoid luminosty.

Rik

On Wed, Apr 18, 2012 at 3:22 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Thu, Apr 19, 2012 at 7:34 AM, Rik Cabanier <cabanier@gmail.com> wrote:
>
>> -webkit-mask-image is identical to SVG's definition of mask: convert RGB
>> to luminance and multiply with the alpha.
>>
>
> The discussion in http://www.webkit.org/blog/181/css-masks/ suggests it
> only uses alpha. This testcase, run in Chrome, also indicates that only
> alpha is used:
>
> <canvas id="c" width="100" height="100"></canvas>
> <div id="d" style="width:100px; height:100px; background:lime;"></div>
> <script>
> var c = document.getElementById("c");
> c.getContext("2d").fillRect(0, 0, 100, 100);
> document.getElementById("d").style.webkitMaskImage = "url(" +
> c.toDataURL() + ")";
> </script>
>
> Rob
> --
> “You have heard that it was said, ‘Love your neighbor and hate your
> enemy.’ But I tell you, love your enemies and pray for those who persecute
> you, that you may be children of your Father in heaven. ... If you love
> those who love you, what reward will you get? Are not even the tax
> collectors doing that? And if you greet only your own people, what are you
> doing more than others?" [Matthew 5:43-47]
>
>
Received on Wednesday, 18 April 2012 22:37:12 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:52 GMT