The system allows you to remove unused classes… which I and many others had requested a while back.
Thank You Webflow for listening.
Here’s another feature I would like to have.
I would like the ability to lock in a class... that is not currently used - but I intend to use it.
Here’s an Example of how I would use it:
- I create a class in Webflow.
- I remove the class from an element.
- I export the website.
- I programmatically (using php and jquery) place a predefined class (that I created in Webflow) onto an element.
Currently… the element and class must be static… ie: it must live in a predefined namespace…
- otherwise it is considered unused.
Unused classes are deleted if you select
Navigator -> Style Manager -> Clean Up.
Where to place this feature…
Navigator -> Style Manager -> Wrench option.
When you select the Wrench… you can
- rename the class, delete the class, or lock / unlock the class.
“Locked Classes” would be considered “in use”… and thus will not be deleted if you select the
Navigator -> Style Manager -> Clean Up option.
Here’s a Real World Example… this is actually what I need - right now. Currently, I am maintaining the classes externally. It’s a PITA to do it this way.
Event Calendar. Obviously - the data (Event Date / Time / Description / Status / etc) are dynamic pieces of information. Using PHP, I load data using SQL from a database… and insert specific classes into the code.
Also - as the user is making “selections”… I can dynamically change pieces of information “dates” using JQuery / Ajax and write them back to the database.
This allows to me dynamically create data (elements) and attach classes at will… to static elements.