Find unused css

前端 未结 8 2032
醉梦人生
醉梦人生 2020-12-05 11:31

I\'m doing some development for some pages on our internal network. I want to know if there\'s an open source tool or FF plugin which can identify unused css within a projec

相关标签:
8条回答
  • 2020-12-05 12:05

    If you are familiar with node js you can also use "find unused css": https://www.npmjs.com/package/find-unused-css

    0 讨论(0)
  • 2020-12-05 12:06

    dust-me-selectors Firefox addon is now compatible with Firefox 16...

    0 讨论(0)
  • 2020-12-05 12:06

    Is it possible to combine all of your HTML pages together into one single page, for example using:

    type *.htm > all-pages.htm
    

    Then you could run Firefox/CSS Usage on this single, 'super' page?

    0 讨论(0)
  • 2020-12-05 12:07

    There is a new program at sourceforge called CSS Scanner, it scans for used and unused css classes and stylesheets in html, aspx, php, javascript and jquery code. It's .net code so you'll need Windows: http://sourceforge.net/projects/cssscanner/

    0 讨论(0)
  • 2020-12-05 12:18

    I've been looking for a while, and the best thing I found was this:

    http://unused-css.com/

    They scan your site and email you the result css.

    I am aware you are working on a localsite, however if you find no alternative, you can upload your site somewhere and use this

    Alternatively

    You could install a previous version of firefox that is compatible with dust-me selectors and run it along side your current installation of firefox.

    0 讨论(0)
  • 2020-12-05 12:18

    Google Chrome (and therefore probably Safari as well) have the developer tools installed, which come with Audits. When you audit the page, the unused CSS rules is one thing it checks.

    Here's what it looks like on this page.

    Audit

    0 讨论(0)
提交回复
热议问题