#Hi guys I m working on a React component
1 messages · Page 1 of 1 (latest)
Tailwind doensn't work with variables. To achieve what you want to do, use style only for the bg.
Going deeper, tailwind runs on build, so it needs to see all classes and then it compiles the css needed, but only the ones that were used. So if you have a variable, tailwind doesn't recognize the rule nor the value you are trying to apply and just ignore it