Nice polyfill, but whenever I try to use decimal values as scroll-snap-destination, it does not do anything at all. It would be very nice if the polyfill supported them, e.g. for 3-column horizontal scrolling sliders.
e.g., using
scroll-snap-destination: 0% 33.33%;
fails for me.
As I see it, the fix is pretty easy, just replace the regex in function parseSnapCoordValue() from
/(\d+)(px|%) (\d+)(px|%)/g
to
/(\d+(?:\.\d*)?)(px|%) (\d+(?:\.\d*))(px|%)/g
I you are interested, I will submit a pull request.
Nice polyfill, but whenever I try to use decimal values as scroll-snap-destination, it does not do anything at all. It would be very nice if the polyfill supported them, e.g. for 3-column horizontal scrolling sliders.
e.g., using
fails for me.
As I see it, the fix is pretty easy, just replace the regex in function parseSnapCoordValue() from
to
I you are interested, I will submit a pull request.