Replies: 4 comments 5 replies
-
The postcss functionality and docs were added in #316 by @ahmeij, and those instructions work for me. Can you paste the output from |
Beta Was this translation helpful? Give feedback.
-
I'd also like to add: this is a community-supported project, and the maintainers don't happen to use postcss, so we're likely unaware of rough edges. We would definitely welcome improvements to the documentation! |
Beta Was this translation helpful? Give feedback.
-
As far as I know Tailwind uses Postcss under the hood in all cases (the project is also sponsored by tailwind). Tailwind describes how to setup Tailwind with Postcss here: https://tailwindcss.com/docs/installation/using-postcss The layer that tailwindcss-rails adds is only very thin, it checks if the file exists and if so it will add it to the command line parameters of the tailwind executable. Hopefully the above will help you get it working. Without more information I don't know what to add, a more detailed problem description would be helpful |
Beta Was this translation helpful? Give feedback.
-
I'm running into the same issue:
From what I understand, PostCSS needs to be installed via npm and pre-processes the CSS using JavaScript. However, I don't see any integration with npm and/or node and was confirmed here. It looks like we're passing the option but it doesn't actually do anything? Any thoughts here? This does make sense though from Tailwind's docs:
If thats the case, I think we would need to go the standard NPM installation route if we're looking to extend tailwind "functionality". |
Beta Was this translation helpful? Give feedback.
-
Unfortunately it is not totally clear what is required in order to use PostCSS with this Gem.
The Readme simply states to add the config file but does not describe any other prerequisites or setup requirements.
There are very many ways in which one can add postcss with many Rails applications running different setups (webpacker/sprockets/importman/yarn/node/etc) but this is not clear enough in the readme. It would be nice if this section had more information and explicit setup instructions to use postcss with
tailwindcss-rails
.Simply installing this gem, running
./bin/rails tailwindcss:install
and then adding thepostcss.config.js
example file as described, does not work out of the box. Would be very helpful with extended information.Beta Was this translation helpful? Give feedback.
All reactions