What tool can analyze my site and report on unused / unneeded CSS?

后端 未结 6 1690
滥情空心
滥情空心 2021-01-12 13:36

how can i find in a early way that this css class is being used or not in website ?

like-

style property that i write in my css is being used or not?

6条回答
  •  星月不相逢
    2021-01-12 14:29

    While this is rather old a question, TopStyle 5 kicks out reports about Class Usage, Orphan classes, Undefined Classes, ID Overview and Case Mismatch for whole sites, all linked to the respective file or spot in the stylesheet. However, AFAIK only stylesheets are analyzed, not style blocks or inline styles, but that may depend on the layout of the site. For the sites here style blocks are inserted dynamically, so that may be the reason TopStyle misses them. Of course it's not free.

提交回复
热议问题