I’ve made an implementation of Tailwind CSS for Hugo Pipes, using PostCSS, along with a PostCSS plugin called PurgeCSS.
PurgeCSS removes everything from your CSS file that’s not referenced in your templates.
Tailwind is a utility-class CSS library that essentially allows you to just write small, single-purpose classes in your templates, and not necessarily write any CSS.
Note here I’m referring to the Hugo PostCSS implementation, not SASS/SCSS.
Hugo Pipes appears to regenerate CSS files when the assets directory changes. This seems correct to me, yet,—because my CSS file only contains classes that are in my templates—if I add a new class, I need my CSS file to update when I change a file in my layouts directory.
Is it possible to initiate an update on a change in layouts/themes? Perhaps it would be a PostCSS-CLI option, where the --watch flag does the work here?