This is my first time doing front-end development. When I first joined the company, I was assigned the task of finding useless and duplicated CSS in a website built with ThinkPHP.
My idea is: use the Firefox plug-in to find out the unused css on each page, and then analyze which css are not used on all pages.
Please tell me, is there any good method?
There is a css usage plug-in under firefox. Take a look
It’s unrealistic to find it. The stupidest and fastest way is to rewrite it so that you can effectively organize html and css.
css usage is only for this page, not this site, so you know this cannot be quantified.
The fastest is indeed rewriting. . .
That is, the css file is not imported. Create a new one and then refer to FF debug to write one by one
Or you can choose to do this. Open the CSS file and use the editor's search. If the corresponding selector content appears, remove it
Thank you everyone! I also think this task is really painful