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:
1 parent
1ff55ac015
commit
bad5a7db69
1 file changed
+10
@@ -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 {
|
@keyframes spin {
|
||||||
from {
|
from {
|
||||||
transform: rotate(0deg);
|
transform: rotate(0deg);
|
||||||
|
|||||||
Reference in new issue
Block a user