Just curious, did you manage to only purge the unused css?
E.g. if I only use the primary colour, in all the Buttons, throughout my project, would the resulting styles contain also "success", "danger" etcetera... or would the unused styles be purged?
The main idea of this collection is to customize everything according to your needs. By default, all the classes defined for button will be preserved. if you want them to be purged automatically, you can only define the colour that you want to use (eg: primary only).
Just curious, did you manage to only purge the unused css?
E.g. if I only use the primary colour, in all the Buttons, throughout my project, would the resulting styles contain also "success", "danger" etcetera... or would the unused styles be purged?
The main idea of this collection is to customize everything according to your needs. By default, all the classes defined for button will be preserved. if you want them to be purged automatically, you can only define the colour that you want to use (eg: primary only).
That makes sense thanks, I quite like the idea behind tailwindcss, but I wish it could allow to use javascript to build the classes...
It’s possible to use JavaScript to build classes with tailwindcss (Css in Js). Check out the library twin-macro
Interesting! I will have a look, thanks for it!