Choose which unused css classes to remove

It would be extremely convenient if I could clean up the css without being forced to erase all of the unused classes.

I'm using Webflow and Udesly to maintain a Wordpress theme and I often need to replace designed elements with short-codes to extend the functionality of the element. Once the element is replaced, its classes become unused and I can no-longer clean up the css without erasing them.

Since I still need to use the css, I've installed a WP plugin that stores code snippets and loads them onto the site. I'd rather not manage css in multiple places for a few reasons...

  • Each time a new dev contractor needs to be onboarded, I spend a lot of time showing them where all the different snippets of code are managed, even after I've created documentation.
  • Managing inherited css styles is more difficult because I can't control where the plugin loads the css snippets.
  • The company uses another plugin to optimize the code and bring load times down. It compresses all the css into 1 area on the dom, minifies it, removes duplicated code, and lots of other things. This will sometimes break the styles of an element and it's cumbersome to debug with the css being spread out. I have the plugin ignoring the css for now, but I'd like to let it do its job.

You get the idea. Being able to choose which unused css classes get removed will let me store all the styles produced in Webflow in one place, even if the element no-longer exists in Webflow.

  • Roy Alnashef
  • Dec 11 2019