So this is a bit strange. I have a blurred element (filter: blur(..), just a black box for example here) that is scaled up slightly (transform: scale(2)) in order to hide the blurred edges. Now when a preceding element animates the transform property, the blurred element shows a visual glitch (perhaps losing its scale(2), but I'm not sure) for the duration of the animation.
I see this behavior in Chrome (on Linux), but not Firefox.
I have tried adding backface-visibility: hidden and translateZ(0) to the blurred element, but these actually cause the same visual glitch just described. I am not sure why this is.
Any workarounds or insight into this issue is appreciated! Here is a minimal reproduction:
https://jsfiddle.net/malwilley/tz4fwmu2/
button {
width: 400px;
height: 60px;
transition: transform 500ms;
}
button:hover {
transform: translateY(-4px);
}
.container {
margin-top: 20px;
overflow: hidden;
height: 200px;
width: 400px;
}
.blurred {
height: 100%;
width: 100%;
overflow: hidden;
background: black;
filter: blur(10px);
transform: scale(1.2);
}
<button>Hover me</button>
<div class="container">
<div class="blurred" />
</div>