Component

Focus Gallery, without JavaScript

This page loads no script at all. The gallery keeps its layout, its scroll run and its keyboard navigation: all of that is written in CSS. What goes is the highlighting of the centred image — only a script can know which one it is. Instead, the scrolling snaps to each image by itself, with scroll-snap.

Six images, snapped one by one by the browser alone.

The page carries on

The component fits in a single section one screen tall. Its scrolling area hands control back to the page as soon as it reaches the end, without having to listen to anything — and that behaviour owes nothing to the script either.