Site logo

[Resolved] How to get rid of block-library/style.min.css

Home Forums Support [Resolved] How to get rid of block-library/style.min.css

Home Forums Support How to get rid of block-library/style.min.css

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2292365
    Bernhard

    Hello, I extracted the critical CSS of the style.min.css as described here and inserted it in a hook before header called Preload style.min.css. Now I want to defer /wp-includes/css/dist/block-library/style.min.css but I don’t know how to.
    I tried with <link rel="stylesheet" href="/wp-includes/css/dist/block-library/style.min.css" media="print" onload="this.media='all'"> but maybe it does not work or I don’t use it correct in Elements.
    Thank you,

    #2292373
    Ying
    Staff
    Customer Support

    Hi Bernhard,

    Can you tell me what’s your purpose of doing all this?

    I’m trying to figure out what you want to achieve.

    Let me know!

    #2292381
    Bernhard

    Hi Ying,
    it’s to reduce LCP. Pagespeed insight gives me this CSS file with a size of 12,9 KiB and potential savings of 12,8 KiB.

    #2292520
    Fernando
    Customer Support
    #2293194
    Bernhard

    Very good, thank you 🙂

    #2293485
    Fernando
    Customer Support

    You’re welcome Bernhard! 🙂

    #2294459
    Bernhard

    After testing the new setup, I believe that the file block-library/style.min.css is not necessary when building a site from scratch with GenerateBlocks Pro. Currently I still use the old image block and the spacer, but it can easily be replaced with the various formatting options in GenerateBlocks Pro and the new image block is much more powerful. Eliminating block-library/style.min.css and inserting a few lines of CSS for the old images and the spacer brought my LCPs to green in PSI on most of my pages, even having a lot of JS originated by Ezoic Ads.

    #2294554
    Fernando
    Customer Support

    That’s great to hear! Thank you for sharing!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.