Css scroll snap compatibility
See original GitHub issueThis is:
- Bug
Specifications
- AOS version: 2.3.4
- OS: MacOS
- Browser: Chrome, Firefox and Safari 12.0
Expected Behavior
When i use the css scroll-snap-type: mandatory, aos-animate class must be added to the node
Actual Behavior
aos-animate class is NOT added to the node and animation are not triggered
Steps to Reproduce the Problem
- Put this css on a container
height: 100vh;
overflow-y: scroll;
scroll-snap-points-y: repeat(100vh);
scroll-snap-destination: 0 0;
scroll-snap-type: y mandatory;
scroll-snap-type: mandatory;
This css on child :
scroll-snap-align: start;
height: 100%;
- Install aos
- And add data-aos=“fade-up” on the childs
- AOS animation doesn’t trigger
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:18
Top Results From Across the Web
"scroll-snap" | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >Cross Browser Compatibility Score of CSS Scroll Snap
CSS Scroll Snap on Chrome is fully supported on 69-106, partially supported on None of the versions, and not supported on 4-68 Chrome...
Read more >scroll-snap-type - CSS: Cascading Style Sheets | MDN
The visual viewport of this scroll container will rest on a snap point if it isn't currently scrolled. That means it snaps on...
Read more >Practical CSS Scroll Snapping
Browser support for CSS scroll snapping has improved significantly since it was introduced in 2016, with Google Chrome (69+), Firefox, Edge, ...
Read more >Well-controlled scrolling with CSS Scroll Snap - web.dev
CSS Scroll Snap allows web developers to create well-controlled scroll experiences by declaring scroll snapping positions.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Added this and worked.
aos doesnot work with
overflow-y: scroll;
property. If you want to useoverflow
property you need to refresh AOS on scroll of the window event, which can be triggered asdocument.addEventListener('scroll', (event) => { AOS.refresh();}, {capture: true, passive: true,})
Note to pass
capture
property else event will not triggred onoveflow
property.