also called section tracking · active-anchor highlight · reading position
That rootMargin collapses the viewport to a thin band across its middle, so “current” means what is at eye level rather than what merely happens to be on screen. The index pinned to the top of this page is one. The index is only links to the eight legs, grouped: scroll-target-group makes the browser keep track of which target you have reached, and the timetable styles itself from that, with no observer and no script. The links still work as links. Fogg believed he had come home a day late; travelling east, he had seen eighty sunrises while London saw seventy-nine, and he had won.
How it is built
.plan ol { scroll-target-group: auto } /* its links become markers for the sections */
.plan a:target-current { color: var(--ink) } /* the leg you are on */
.plan a:target-before::before { content: '✓' } /* the legs behind you */
.plan a:target-after { opacity: .45 } /* the legs ahead */In full, on GitHub index.html showcase.css
Engravings — Alphonse de Neuville and Léon Benett, for the illustrated French edition of Le Tour du monde en quatre-vingts jours; public domain, via Wikimedia Commons: the wager at the reform club, passepartout in the pagoda on malabar hill, across india on the elephant kiouni, fix and passepartout in a hong kong tavern, the tankadere in the typhoon, the human pyramid of the long noses at yokohama, a sledge with sails across the frozen plains, back at the reform club, and the route map. Text — the translation by George Makepeace Towle. Facts — Around the World in Eighty Days; the Towle translation at Project Gutenberg.







