Replies: 2 comments
-
If you'd like Tailwind to handle the CSS Edit: trying this myself with the provided repository, this causes a different error:
I would presume this is due to @utility badge-status {
@apply flex items-center justify-center w-full md:w-40 px-10 h-10 rounded-full py-1 border-2;
&-refused {
@apply badge-status bg-negative-200 text-negative-500 border-negative-500;
}
&-validate {
@apply badge-status bg-positive-200 border-positive-600 text-positive-600;
}
} Where Adam Wathan (creator of Tailwind) does seem to advocate avoiding
So long term, I would suggest using Tailwind class names directly as much as possible. So instead of writing components in CSS, use the templating system (looks like twig) to create the components needed. Furthermore, it seems like you're using the PostCSS CLI to run Tailwind. You could consider using Tailwind's CLI ( Otherwise, you'd need to use the |
Beta Was this translation helpful? Give feedback.
-
Hello thank you very much, I will try applying your advices on the usage of @apply and the url() in index.css, it's twig templating yes, also gonna try @tailwindcss/cli 👍 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What version of Tailwind CSS are you using?
v4.0.8
What build tool (or framework if it abstracts the build tool) are you using?
What version of Node.js are you using?
For example: v20.12.2
What browser are you using?
Firefox, Chrome
What operating system are you using?
macOs
Reproduction URL
https://github.com/LLEGIT/tailwind_migration_v4
Describe your issue
I wanted to upgrade tailwind to V4 using the upgrade tool
npx @tailwindcss/upgrade
, the issue is that it create.utilities.css
files that produces this error on theyarn build
process :If I comment the line declaring this property, this will produce another error message with the next utility class
Beta Was this translation helpful? Give feedback.
All reactions