Created attachment 459191 [details] div red box that uses mask image with multiple gradients Recent Safari/iOS 15.4 broke css mask image where you can have multiple gradients. In the recent Safari notes https://developer.apple.com/documentation/safari-release-notes/safari-15_4-release-notes, mask property is added as well as long forms and webkit-mask is aliased. I'm not sure which mask property is causing the regression, the mask-image or the mask-composite. The following code works in Chrome and Firefox, and used to work before Safari/iOS 15.4, the last version where it worked was Safari/iOS 15.2 ```css div { -webkit-mask-image: linear-gradient(to right, transparent 0px, rgb(0, 0, 0) 50px), linear-gradient(to left, transparent, rgb(0, 0, 0) 50px); mask-image: linear-gradient(to right, transparent 0px, rgb(0, 0, 0) 50px), linear-gradient(to left, transparent, rgb(0, 0, 0) 50px); -webkit-mask-composite: source-in; mask-composite: intersect; } ``` Here's demo example that uses mask image with multiple gradients. Code Demo: https://codepen.io/Kahlub/pen/QWQKLqe A library uses this mask image with multiple gradients feature https://github.com/aquaductape/solid-scroll-shadows, but now it's broken due to Safari/iOS 15.4
I forgot to mention, by broken, I mean the element where the mask image is applied to is no longer visible
<rdar://problem/93152779>
Presumably regressed at r286795.
There are 2 issues here (thank you Matt for giving more details): 1. -webkit-mask-composite: source-in now computes to -webkit-mask-composite: source-in, source-in instead of -webkit-mask-composite: source-in, source-over for multiple gradients since r286795 2. -webkit-mask-composite: source-in/mask-composite: intersect has different behavior on a single gradient compared to other browsers, but this pre-dates r286795 (tested on an older computer) 1. can be fixed by restoring the old behavior for -webkit-mask-composite, but the testcase wouldn’t be fixed until 2. is fixed too, since it uses both prefixed and unprefixed versions.
mask-composite behaves per-spec, the only possible action item here is change the prefixed version.
*** Bug 241004 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 241541 ***