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

Re: Concern about -webkit-mask

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 19 Apr 2012 10:22:20 +1200
Message-ID: <CAOp6jLbpo7T=B60L-1urrDjZ0yjEU36Vbmd+EWcZcVZ+E=2s0A@mail.gmail.com>
To: Rik Cabanier <cabanier@gmail.com>
Cc: John Daggett <jdaggett@mozilla.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
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>
var c = document.getElementById("c");
c.getContext("2d").fillRect(0, 0, 100, 100);
document.getElementById("d").style.webkitMaskImage = "url(" + c.toDataURL()
+ ")";

“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:22:52 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:57 UTC