From bad5a7db69a4eb34a1e2a7474e72e1fbc8de2573 Mon Sep 17 00:00:00 2001 From: elvira Date: Tue, 3 Nov 2026 00:03:32 +0200 Subject: [PATCH] CSS: cross-document View Transitions @view-transition { navigation: auto } inside prefers-reduced-motion: no-preference, so page changes cross-fade in supporting browsers and stay instant for visitors who ask for less motion. Turbo Frame listing updates aren't document navigations and are unaffected. Co-Authored-By: Claude Opus 5.5 --- resources/css/app.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resources/css/app.css b/resources/css/app.css index 0dec220..b52d796 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -69,6 +69,16 @@ @layer base { } } +/* Cross-document View Transitions: page-to-page navigations cross-fade + instead of flashing white. Off for visitors who ask for less motion; + browsers without support just navigate normally. Turbo Frame updates + aren't document navigations, so they're unaffected. */ +@media (prefers-reduced-motion: no-preference) { + @view-transition { + navigation: auto; + } +} + @keyframes spin { from { transform: rotate(0deg);