I have some CSS that on hover, a CSS transition effect will moves a div.
The problem, as you can see in the example, is that the translate
transition has the horrible side effect of making the image in the div move by 1px down/right (and possibly resize ever so slightly?) so that it appears out of place and out of focus...
The glitch seems to apply the whole time the hover effect is applied, and from a process of trial and error I can safely say only seems to occur when the translate transition moves the div (box shadow and opacity are also applied but make no difference to the error when removed).
The problem only seems to happen when the page has scrollbars. So the example with just one instance of the div is fine, but once more identical divs are added and the page therefore requires a scrollbar the problem strikes again...
translateX/translateY
centering and you know the element dimensions, you can always fallback to the classic negative margin of half of the size of the centered element. and if your element is just1px
at size just don't translate it doesn't make sense if you are already 50%-ing the 1px el :) . – Datestamp