Skip to content

Commit

Permalink
Testing: Disable CSS animations without style dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Mar 1, 2019
1 parent 7721d91 commit 44351ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/e2e-tests/plugins/disable-animations.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
* Enqueue CSS stylesheet disabling animations.
*/
function enqueue_disable_animations_stylesheet() {
wp_register_style( 'gutenberg-disable-animations', null, array() );
wp_enqueue_style( 'gutenberg-disable-animations' );
$custom_css = '* { animation-duration: 0ms !important; }';
wp_add_inline_style( 'wp-components', $custom_css );
wp_add_inline_style( 'gutenberg-disable-animations', $custom_css );
}

add_action( 'enqueue_block_editor_assets', 'enqueue_disable_animations_stylesheet' );

0 comments on commit 44351ed

Please sign in to comment.