• Hi!

    The last version removes animation CSS that was loaded by default to all pages in prev versions. My themes are based on this CSS file loaded from your plugin.

    How can we add it back and not load it 2 times?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @webprom,

    We didn’t change anything with the blocks animation script loading so it should load just like it did before. Are you using any particular theme where this is being caused?

    Thread Starter Webprom Design

    (@webprom)

    I see, you’re not loading animation CSS when the content has no blocks.

    My fix to this:

    function animation_styles() {
        if ( is_plugin_active('blocks-animation/blocks-animation.php') ) {
            if ( !wp_style_is( 'animate-css' ) ) {
                wp_enqueue_style( 'animate-css', '/wp-content/plugins/blocks-animation/assets/animate/animate.min.css' );
            }
        }
    }
    add_action( 'wp_enqueue_scripts', 'animation_styles' );

    Maybe you already need a settings page with an option to load CSS to all pages.
    Another option could be to adjust on scroll appearance of animations. Sometimes it should appear earlier.

    thanks.

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    @webprom What did you mean by this? “Another option could be to adjust on scroll appearance of animations. Sometimes it should appear earlier.”

    Can you please explain that part? Thank you!

    Thread Starter Webprom Design

    (@webprom)

    Some users say animation is firing too late, and I can’t change that.

    Thanks.

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    @webprom Interesting. We can maybe try to experiment with allowing user to decide the scroll trigger in a future version. Thanks for the feedback!

    Thread Starter Webprom Design

    (@webprom)

    Thank you for the useful plugin!

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Glad you like it!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Animation CSS for all pages’ is closed to new replies.