I am a web developer. Until some time I have a project to maintain. The project has been online for several years, and there were several assistants in front of me. There have been many changes in functionality over a lifetime. Many features have been added, some of them have been removed as unused. Some of these features required new design elements, so new CSS code was added. But when these features were removed, CSS was added. In addition, each maintainer added their own CSS styles for minor fixes such as padding, margins, etc. After a while, CSS files become a huge pile of crap :-) I can find many described CSS elements in the same way, but in different places of the CSS file, Yes, I know that I can minimize and compress CSS files, but I want them to clear.So how can I clear this whole mess?
I need tools / practices / suggestions on these issues:
- Find the same elements described in different places in CSS.
- Collect unused CSS classes or other descriptions (maybe some kind of browser tool / plugin that parses CSS and collects unused styles).
- Tools for refactoring html code, replacing several identical CSS styles with one style.
- Something else...
source
share