Open briankitt opened 11 months ago
I think the counter parent element might change width? Perhaps you can set it to a fixed width. Could also be the font size, could also be triggered by CSS transforms.
I found the issue. I am using a custom font, 'gotham light'. I'd be happy to upload my woff file if you want to test this out.
.tick [data-view]
Has max-width defined in em, but the font size is variable. My guess, is that the browser is changing the width depending if it's a '1' or an '8' because the '1' obviously takes up far less width then the 8 does.
You should be able to easily recreate this problem with the code above, and using 'gotham light' font.
I also had this issue and fixed it by specifying a fixed width for each flipper like this…
.tick-flip {
width: 1.125em;
}
https://github.com/pqina/flip/assets/3027960/49d8c9d6-3839-408c-baa6-171264b5ef9c
If you watch the video, there is occasionally a 1 pixel shift back and forth. Not all the time, just on occasion. My best guess, is that this is likely a css rounding error somewhere.
Code behind