• Resolved snippet24

    (@snippet24)


    So basically this is different from Critical CSS, instead is about removing unused CSS in custom rules or frameworks like Bootstrap.
    Here’s a tool that does that:
    https://purgecss.com/

    This is where PurgeCSS comes into play. PurgeCSS analyzes your content and your css files. Then it matches the selectors used in your files with the one in your content files. It removes unused selectors from your css, resulting in smaller css files.

    Edit also found:
    https://purifycss.online/
    https://github.com/purifycss/purifycss

    • This topic was modified 4 years, 8 months ago by snippet24.
    • This topic was modified 4 years, 8 months ago by snippet24.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    never say never, but it’s not on the short-term roadmap, because:
    1. it’s pretty hard to safely remove unused CSS to work in each browser for each breakpoint. removing too much will break things and -as opposed to critical CSS- there is no fallback
    2. the tools mentioned are not PHP, so can’t integrate them in AO proper. don’t see an SAAS version with an API that can be integrated either
    3. unused CSS will be different for different pages, so you would end up with pages that have totally different CSS, meaning no cache-re-use anymore between pages

    so .. yeah .. ??

    frank

    Thread Starter snippet24

    (@snippet24)

    Understood!!! Thanks so much for explaining!! ??
    Have a nice week ??

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you too ??

    I was looking for a way to use purgecss with autoptimize, but your explanation cleared any doubts/confusion, so thank you! ??

    p.s. and thank you for creating the plugin ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Perhaps support for removing unused css/PurgeCss tool?’ is closed to new replies.