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 <noreply@anthropic.com>
This commit is contained in:
elviraandClaude Opus 5.5 committed 2026-11-03 00:03:32 +02:00
1 parent 1ff55ac015
commit bad5a7db69
1 file changed
+10
+10
View File
@@ -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);