rails / tailwindcss-rails

MIT License
1.41k stars 174 forks source link

allow users to always generate unminified CSS #248

Closed flavorjones closed 1 year ago

flavorjones commented 1 year ago

Discussed in #243. Closes #244.

This PR allows users to set an environment variable TAILWINDCSS_RAILS_NO_MINIFY to turn off minification.

dhh commented 1 year ago

I don't see the point? I see the request, but not the purpose.

flavorjones commented 1 year ago

@the-pulli Can you explain your use case a bit more, please?

the-pulli commented 1 year ago

@flavorjones Sure thing. I have a project which uses TW and custom CSS. If I don't use yui as CSS compressor only my TW CSS gets minified and my custom CSS not. If I use yui as compressor TW gets again minified through yui and it get messed up. My custom CSS gets minified normally in this procedure. I was looking for a way to minify both TW and my custom CSS for production.

dhh commented 1 year ago

I think this should be fixed elsewhere rather than in TW. The minifier should be able to opt out of being applied to a given CSS. Rather than TW knowing about not having to minify.

the-pulli commented 1 year ago

@dhh So if I understood you right, there is currently no way to do this in Rails? It has to be implemented (preferable the code handling compression of the files), but not in TW?