Search code examples
csscoding-styledeveloper-tools

How to copy only used CSS in developer tools


I have CSS file with a lot of unused CSS lines. And I want to clean CSS file but not manually. In browser developer tools I can see (unused/used) CSS but I can't clean file and copy just used CSS.

enter image description here


Solution

  • I think a CSS minifier tool is what you're looking for. There are online tools to help with this. Check out this other answer to see some options. I would recommend using this after you are done with development, otherwise it might make it harder to read.