How can I effectively clean up styles in a large web site?

后端 未结 5 2155
我寻月下人不归
我寻月下人不归 2020-12-01 02:03

Our web site has been under a constant development for a better part of the last five years. As it happens, pretty much all the styles for the site are in one big CSS file.

5条回答
  •  醉梦人生
    2020-12-01 02:36

    You could use Dust-Me Selectors plugin for FireFox to find unused styles:

    http://www.sitepoint.com/dustmeselectors/

    If you have a sitemap you could use that to let the plugin crawl your site:

    The spider dialog has all the controls for performing a site-wide spider operation. Enter the URL of either a Sitemap XML file, or an HTML sitemap, and the program will read that file and extract all its links. It will then load each of those pages in turn and perform a cumulative Find operation on each one.

提交回复
热议问题