Skip to content

Fix conflict with tailwindcss when using @tailwind before @import - #449

Closed
mahdiboomeri wants to merge 1 commit into
postcss:masterfrom
mahdiboomeri:master
Closed

Fix conflict with tailwindcss when using @tailwind before @import#449
mahdiboomeri wants to merge 1 commit into
postcss:masterfrom
mahdiboomeri:master

Conversation

@mahdiboomeri

Copy link
Copy Markdown

Hello there
This PR will fix the conflict between postcss-import and tailwindcss when we try to use import after tailwind's @tailwind base or @tailwind components
well obviously we can put @import before these two statements but in the result our custom CSS will be added "before" normalize styles and that is not pretty or standard.

After this PR the above syntax is valid

@tailwind base;
@tailwind components;

@import "./buttons.css";

Sorry for my bad English.

@RyanZim

RyanZim commented Feb 15, 2021

Copy link
Copy Markdown
Collaborator

Sorry, we can't be adding support for non-standard at-rules; if we start here, there will be no end to the list. Instead, I suggest you create a file tailwind-base.css that simply contains @tailwind base;, and likewise for components. Then in your main CSS file, you can do:

@import "./tailwind-base.css";
@import "./tailwind-components.css";

@import "./buttons.css";

@RyanZim RyanZim closed this Feb 15, 2021
@mahdiboomeri

Copy link
Copy Markdown
Author

OK i understand
thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants