An RGBA background color can appear darker than intended when using translate3d or translateZ inside an element with -webkit-overflow-scrolling: touch.
Platforms:
iOS 8.4
How to reproduce:
Create a container with -webkit-overflow-scrolling: touch;
On an element inside the container add transform: translate3d(0, 100px, 0)
Reduced Example:
http://codepen.io/MethodGrab/full/JdwYGV/
In most browsers clicking the "toggle translate" button has no effect on the background color but in Mobile Safari, the background gets darker.
Workarounds:
Use translateX / translateY instead of translate3d / translateZ
Summary:
An RGBA background color can appear darker than intended when using
translate3d
ortranslateZ
inside an element with-webkit-overflow-scrolling: touch
.Platforms:
How to reproduce:
-webkit-overflow-scrolling: touch;
transform: translate3d(0, 100px, 0)
Reduced Example:
http://codepen.io/MethodGrab/full/JdwYGV/ In most browsers clicking the "toggle translate" button has no effect on the background color but in Mobile Safari, the background gets darker.
Workarounds:
translateX
/translateY
instead oftranslate3d
/translateZ
-webkit-overflow-scrolling: touch