/* * Changing page on the desktop (mobile/routeTransition.ts marks it 'page'): one * short cross-fade, the old page and the new at the same time, with nothing * moving. Short on purpose: a page change has to feel like an answer to the * click, not like something to wait for. The navbar keeps its own name, so it * stands still above the pages instead of fading with them; it switches to its * new state at once. */ [data-desktop-navbar] { view-transition-name: trek-navbar; } @keyframes trek-page-out { to { opacity: 0; } } @keyframes trek-page-in { from { opacity: 0; } } :root[data-route-transition='page']::view-transition-old(root) { animation: trek-page-out 0.14s ease-out both; } :root[data-route-transition='page']::view-transition-new(root) { animation: trek-page-in 0.14s ease-out both; } ::view-transition-old(trek-navbar) { display: none; } ::view-transition-new(trek-navbar) { animation: none; } @media (prefers-reduced-motion: reduce) { :root[data-route-transition='page']::view-transition-old(root), :root[data-route-transition='page']::view-transition-new(root) { animation: none; } }