zigotica / scrollsnappointspolyfill Goto Github PK
View Code? Open in Web Editor NEWCSS scroll Snap Points Polyfill
CSS scroll Snap Points Polyfill
This polyfill sounds great. Could you create a (simple) demo site using this polyfill?
I've just upgraded to iOS 11 and it no longer works. It just scrolls - there is no snapping anymore.
When i scroll slightly over a snap-point, this polyfill will go with the scroll, displaying the a part of the content that is further than the next snap-point and then snap back to the closest snap-point.
For example, i scroll down 2 1/4 elements.
I then see the 3rd element.
The scroll-snap is at the beginning of the 2nd element though.
The polyfill thus is moving back there, but does so with a flickering.
It goes back too far, then comes to a rest at the right position.
In Safari it appears to always go down to the next snap-point in the direction of scrolling.
This prevents the flickering and is a more natural feel.
Browser: Chrome 46, but it's a general issue
Expected behaviour, on Safari 9: http://cloud.h-o.nl/gFMU
Result with the polyfill on Google Chrome: http://cloud.h-o.nl/gFX9
Is there a licence for the code in this repo?
You should test for prefixed properties, too.
Consider using https://github.com/philipwalton/polyfill
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.