Device-Bugs icon indicating copy to clipboard operation
Device-Bugs copied to clipboard

Mobile Safari RGBA background color appears darker than intended

Open MethodGrab opened this issue 10 years ago • 1 comments
trafficstars

Summary:

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:

  1. Create a container with -webkit-overflow-scrolling: touch;
  2. 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.

image image

Workarounds:

  • Use translateX / translateY instead of translate3d / translateZ
  • Don't use -webkit-overflow-scrolling: touch

MethodGrab avatar Jul 31 '15 12:07 MethodGrab

Any update if this was ever fixed. I am experiencing this issue right now including that the text looks less sharp.

rolero avatar Aug 11 '17 09:08 rolero