How to remove unused styles from twitter bootstrap?

后端 未结 5 1227
一生所求
一生所求 2021-02-01 05:28

My bootstrap stylesheet size is around 120kb.

But I\'m only using 25% of that stylesheet code.

I don\'t want that span* class. I tried it by customizing it in

5条回答
  •  遥遥无期
    2021-02-01 06:03

    I got exactly the same problem!

    I wrote a tool to remove all un-used css style rules in bootstrap.css

    As a result, 59% rule has been removed, css file size reduced from 121KB to 59KB and increased about 5 score when testing with Google PageSpeed

    The source code is here css-optimizer

提交回复
热议问题