Skip to content

Commit ad00f45

Browse files
Merge branch 'trunk' into update/sizes-core-post-featured-image-block
2 parents 7d6bdff + 992239b commit ad00f45

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plugins/view-transitions/includes/settings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function plvt_get_setting_default(): array {
6565
return array(
6666
'override_theme_config' => false,
6767
'default_transition_animation' => 'fade',
68-
'default_transition_animation_duration' => 1000,
68+
'default_transition_animation_duration' => 400,
6969
'header_selector' => 'header',
7070
'main_selector' => 'main',
7171
'post_title_selector' => '.wp-block-post-title, .entry-title',
@@ -330,7 +330,7 @@ static function (): void {
330330
'default_transition_animation_duration' => array(
331331
'section' => 'plvt_view_transitions',
332332
'title' => __( 'Transition Animation Duration', 'view-transitions' ),
333-
'description' => __( 'Control the duration of the view transition. Enter the value in milliseconds (e.g., 1000, 1500, 2000).', 'view-transitions' ),
333+
'description' => __( 'Control the duration of the view transition. Enter the value in milliseconds (e.g., 500, 1000, 2000).', 'view-transitions' ),
334334
),
335335
'header_selector' => array(
336336
'section' => 'plvt_view_transitions',

plugins/view-transitions/includes/theme.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function plvt_sanitize_view_transitions_theme_support(): void {
7777
'.wp-block-post-content, .entry-content' => 'post-content',
7878
),
7979
'default-animation' => 'fade',
80-
'default-animation-duration' => 1000,
80+
'default-animation-duration' => 400,
8181
);
8282

8383
// If no specific `$args` were provided, simply use the defaults.
@@ -317,7 +317,7 @@ function plvt_load_view_transitions(): void {
317317
$default_animation_args = isset( $theme_support['default-animation-args'] ) ? (array) $theme_support['default-animation-args'] : array();
318318
$default_animation_stylesheet = $animation_registry->get_animation_stylesheet( $theme_support['default-animation'], $default_animation_args );
319319
$default_animation_stylesheet = plvt_inject_animation_duration( $default_animation_stylesheet, absint( $theme_support['default-animation-duration'] ) );
320-
wp_add_inline_style( 'plvt-view-transitions', $default_animation_stylesheet );
320+
wp_add_inline_style( 'plvt-view-transitions', '@media (prefers-reduced-motion: no-preference) {' . $default_animation_stylesheet . '}' );
321321

322322
/*
323323
* No point in loading the script if no specific view transition names are configured.

0 commit comments

Comments
 (0)