Full-Screen Snap Scrolling Between Sections
Makes the page snap from one full-screen section to the next while scrolling, for presentation-style landing pages built from Cover or Group blocks with the class "wpide-snap".
Opens WPIDE on
Code
@media (prefers-reduced-motion: no-preference) and (min-height: 500px) {
html:has(.wpide-snap) {
scroll-snap-type: y proximity;
}
.wpide-snap {
scroll-snap-align: start;
min-height: 100svh;
}
}
Notes
Add wpide-snap to each full-height section. Snapping only turns on for pages that contain such sections, and not for visitors who prefer reduced motion.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.