my class from variable is not working, im sure its mix problem.
<div class="rounded bg-gradient-to-r {{$replay->playerOneTeam()}}">
Team: {{ $replay->playerOneTeam()}}
</div>
It seems like purgeCSS or something is removing class "from-red-400". When I set it manually and do npm run dev it works, but when it's used from variable, it's not loading. The class is in code when I inspect but the code runs like it doesn't exist.
Check your
tailwind.config.jsfile and look for something like this:In this example, JIT mode is enabled and
purgeis where you can specify files where to look for used Tailwind CSS classes. From here, you have three options:purgeintocontentandsafelistso the compiler doesn't accidentally remove your classes specified there (which will be classes that do not appear explicitly in purgeable HTML code).Using the example above, the third option would look something like this: