-
|
After upgrading from Tailwindcss v3.3 to v4.1, I am getting the following error: The assets/css/app.css contains: @import "tailwindcss";
@import "../../deps/utilx/assets/css/inputs.css";And In the Tailwind 4.x upgrade guide they recommend using the @reference /path/to/app.css in the imported file. However, including such a reference in A circular dependency (app.css → inputs.css → app.css) Could you please clarify how to make an upgrade so that custom colors and other classes used in the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
Consider checking @import "tailwindcss";
@import "../../deps/utilx/assets/css/inputs.css";
+
+@theme {
+ --color-brand-500: red;
+} |
Beta Was this translation helpful? Give feedback.
-
|
I have the following section in the @wongjn, if I remove this and define in the If references to *app.css:*
@import "tailwindcss";
@reference "./theme.css";
@import "../../deps/utilx/assets/css/inputs.css";
*inputs.css:*
@reference "../../deps/my-main-app/assets/css/theme.css";
... |
Beta Was this translation helpful? Give feedback.
-
|
Thank you! One more question: I have the following that used to work in 3.x: .uc-label-select {
@apply absolute text-sm text-gray-500 dark:text-gray-400
}
.uc-label {
@apply uc-label-select -translate-y-5 scale-75 whitespace-nowrap;
}Is it no longer possible to apply classes such as |
Beta Was this translation helpful? Give feedback.
You'd need to do it for all numeric variants.
If
app.css@imports all the CSS files used in your project, consider defining the@themeinapp.css. The other CSS files thatapp.css@imports do not need to@referenceanything then.Otherwise, if you define
@themeintheme.css,@importit inapp.css. Any CSS files thatapp.css@…