Description
When starting a new rails 7 app and adding, then installing, tailwindcss-rails, and adding a single route using layout, the resulting page will produce this warning in the browser console:
Unrecognized at-rule or error parsing at-rule ‘@tailwind’.
The @tailwind
at-rule should obviously not be in the processed output.
It still is, because the standard app/assets/stylesheets/application.css
file contains the = require_tree .
directive. This way, while the tailwind preprocessing does handle everything correctly, in addition the application.tailwind.css
file is processed in the asset pipeline. It is concatenated into the fingerprinted application.css verbatim.
It does little damage, because all styles are working, but it's confusing and dirty. It might be obvious for many, but the docs for installation could use a note to change a possibly existing default application.css
manifest.
Rails 7.0.3.1
tailwindcss-rails 2.0.12