-
I am using tailwind 4.1.3, But I met a problem, my custom varible not working. I have add
but in browser, there is no class called bg-my-custom-bg, why? |
Beta Was this translation helpful? Give feedback.
Answered by
wongjn
Apr 11, 2025
Replies: 1 comment 1 reply
-
You're using v4, which doesn't automatically use the @theme {
--color-my-custom-bg: green;
/* Or */
--background-color-my-custom-bg: green;
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lumixraku
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're using v4, which doesn't automatically use the
tailwind.config.js
file. Since thetailwind.config.js
is considered legacy, consider configuring Tailwind in the CSS file. Thus, add insrc/index.css
(orsrc/variable.css
since that is@import
ed bysrc/index.css
):