• Resolved krikke

    (@krikke)


    Hey there,

    First and foremost, thank you for the great plugin! I absolutely love it and use it on many parts of my website.

    Now on to the issue I am facing, I noticed this plugin loads unused css files (as identified by Google Pagespeed) and I agree.

    It loads:
    /wp-includes/css/dist/components/style.min.css
    /wp-includes/css/dist/block-editor/style.min.css
    /wp-includes/css/dist/block-library/style.min.css

    I don’t see theses css files being necessary or used.

    I have disabled the plugin and this warning goes away, so I am positive it enqueues these styles.

    Could you help me investigate and if needed fix this?

    Cheers
    Kristof

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter krikke

    (@krikke)

    It seems this causes the unnecessary styles to load in init.php:

    Line 76: 'style' => 'bod-modal-block-style-css',

    Update: I may have fixed it, could you please confirm and if validated include in the release branch?

    Fix as follows, all in init.php:

    Removed on line 48: trailing , at the end of the line
    Removed line 49: array( 'wp-editor' )
    Added on line 57: 'wp-editor' in array( 'wp-edit-blocks', 'wp-editor' )

    Seems to have fixed it for me and still enqueues the styles in the back end, but I don’t know the exact impact.

    • This reply was modified 4 years, 8 months ago by krikke. Reason: possible fix
    Plugin Author merbmerb

    (@merbmerb)

    You could be right but I will not have time to take a look until Monday or Tuesday.

    Plugin Author merbmerb

    (@merbmerb)

    I tested that change and it looks OK. I will update the source code and ensure it is part of the next release.

    Thanks

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

The topic ‘Plugin loads unnecessary CSS’ is closed to new replies.