New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-masking-1] Mask on mask behavior #328
Comments
I created a slightly modified example: https://codepen.io/krit/pen/PXoYNN Edge does seem to support mask on mask but is the only browser that does. Firefox on Windows looks white btw. |
Just a couple of comments on the above test cases. There are a couple of gotchas here, that may be worth noting just to avoid others scratching their heads like I did for a while. The first issue is fairly obvious. In the original SVG supplied by @RazrFalcon, the The second issue relates to the gradient. It is interpolating from transparent white to black. This can cause problems if gradients aren't being interpolated and composited in the correct colour space. For example, Dirk's test case is blank on Firefox due to this. If we modify the gradient by adding a halfway step, the masked green square is now visible. https://codepen.io/PaulLeBeau/pen/BvyBXZ To avoid these issues causing confusion, it might be a good idea not to use that problematic gradient and instead use a more straightforward test case that more directly addresses the mask on mask issue.
|
@BigBadaboom can you provide a PNG as a reference for the last example? |
Yes. Looks like librsvg is the only one that supports it. |
@RazrFalcon From the test of @BigBadaboom it seems like browsers do support mask on mask. (Thanks for catching the issue btw.) Can we close this issue now? |
@dirkschulze No they don't all support it. I just tested Chrome, Firefox, Safari and Edge. The only one that rendered my test case correctly was Edge. |
@BigBadaboom Argh, must have checked with the wrong test. Indeed, doesn't work on Chrome or Firefox. First mask still works, not the mask on the mask. Simply gets ignored. |
Moved from w3c/svgwg#608, opened by @RazrFalcon
https://www.w3.org/TR/css-masking-1/#the-mask
I'm trying to understand how a
mask
element with amask
attribute/property should be rendered.I've made a simple example, but no matter what I do - it still renders the same in all applications. Looks like everyone is simply ignoring the
mask
property. Does no one support it or am I missing something?The text was updated successfully, but these errors were encountered: