I love the full-screen ink transition effect and I have used the design on several of my own sites and it has worked without any issues for years. However, I have noticed that recently webkit browsers cause the transform effect to flicker and really destroys the effect on Chrome, Edge, etc. After Googling this issue it seems that the flickering is caused by webkit browsers flipping in and out of hardware acceleration mode and can be fixed by adding the CSS attribute -webkit-transform:translate3d(0,0,0);
to the element being transformed.
However, I have tried applying this attribute to every block of transformed code (.cd-modal
, .modal-content
, .cd-transition-layer
) I could find and it doesn't seem to work unless I apply it to all HTML in the document using html {-webkit-transform:translate3d(0,0,0);}
. However, this causes other problems, namely knocking all position:fixed;
elements, including the full-screen modal window itself, into a new coordinate system. The result is that the full-screen menu is no longer full screen, or scrolls the length of the body
, or is in a different frame than the transition layer, etc.
I have been able to mostly fix this using position:sticky;
on various elements but it is a real hack and causes several other problems. Is there another way, or what element(s) in specific need to be initialized in 3d transform mode? Any help is appreciated. Here is my Codepen (if it works as expected, launch it in full screen in a new window to see the glitch).
Comments
Post a Comment