I'm using a responsively-sized SVG clipPath to mask fixed-position divs with image backgrounds. This was all working fine (Firefox, Chrome, IE & Opera) until it was pointed out to me that it was failing in Safari. After several hours, I realised that Safari was only applying the SVG clipPath
to one of the three divs it was supposed to. I googled it on Bing and found this question which is essentially the same thing but with no answer; just a comment to try forcing CSS hardware acceleration (-webkit-transform:translateZ(1px)
/ -webkit-transform:translate3d(0, 0, 0)
).
I did that, and POW! it totally works for Safari... but now looks utterly messed up in Chrome. It's as if the repainting has gone totally out of whack (I scroll up and down, and the distorted, choppy effect in Chrome is different every time).
The problem is that both Chrome & Safari are WebKit-based, so I guess vendor prefixes aren't really going to help me here?
For reference, here's how it should look (screenshot from FF, currently looks the same in Safari):
And here's how it looks in Chrome with CSS hardware acceleration:
Ideally, I need to either a) stop the awful repaint issue in Chrome, or b) find an alternate fix for the clipPath
not working on multiple elements in Safari.