darsain / sly

JavaScript library for one-directional scrolling with item based navigation support.
http://darsa.in/sly
2.87k stars 496 forks source link

Blurred text with translateZ #114

Closed darsain closed 10 years ago

darsain commented 10 years ago

There is a report of blurred text when Sly animates slidee while using tranzlateZ(0) hack, although I'm not experiencing it myself.

translateZ(0) is used to make animations smoother as rendering of slidee element is than handed over to GPU, and in browsers that support it is a substantial performance boost.

Sly always ends the animation on full rounded pixel, never on a subpixel position, so if there is blurring, it is a browser bug and there is not much that can be done about it.

I've tried setting translateZ(0) only when in motion, but that introduces jittering every time animation starts (while element is being handed over to GPU), so this is not a good idea.

There is currently nothing on my mind that could fix the burring, other than just waiting for browsers to fix it, but if enough people raise their hands, I might add a disable flag.