Skip to content

Commit ae7bed8

Browse files
committed
Respect prefers-reduced-motion settings
1 parent 714dd71 commit ae7bed8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/view-transitions/includes/theme.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ function plvt_load_view_transitions(): void {
304304
plvt_register_view_transition_animations( $animation_registry );
305305

306306
// Use an inline style to avoid an extra request.
307-
$stylesheet = '@view-transition { navigation: auto; }';
307+
$stylesheet = '@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }';
308308
wp_register_style( 'plvt-view-transitions', false, array(), null ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion
309309
wp_add_inline_style( 'plvt-view-transitions', $stylesheet );
310310
wp_enqueue_style( 'plvt-view-transitions' );

0 commit comments

Comments
 (0)