How do I identify and eliminate unused CSS styles from my bloated stylesheet?

后端 未结 7 1555
天涯浪人
天涯浪人 2020-12-10 10:39

I have a legacy stylesheet that is now full of unused styles. The problem is identifying the necessary from the unnecessary. Are there any tools to help with this?

7条回答
  •  再見小時候
    2020-12-10 11:06

    There is a really handy plugin for Grunt called UnCSS. It will automatically remove unused CSS on the fly. Check out this link for more info:

    Remove Unused CSS automatically using Grunt

提交回复
热议问题