Skip to content

Warning "Unrecognized at-rule or error parsing at-rule ‘@tailwind’." in clean install #190

Closed
@febeling

Description

@febeling

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions