I'm using TailwindCSS v4.0.x, and @source inline safelist doesn't work with either the CLI, PostCSS, or even the Vite plugin:
@import "tailwindcss";
@source inline("{hover:,}bg-red-{50,{100..900..100},950}");
With all three plugins, I get the following error message:
[@tailwindcss/vite:generate:build] '@source' paths must be quoted
It doesn't work even with the example from the documentation. What is the correct solution?
Reproduction:
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/[email protected]"></script>
<style type="text/tailwindcss">
@source inline("{hover:,}bg-red-{50,{100..900..100},950}");
</style>
<div class="text-3xl bg-red-100 hover:bg-red-900">
Hello World
</div>
Although the browser plugin doesn't give a specific error message in the console, it's clear that the classes aren't being applied - neither text-3xl nor the bg-red-50 or hover:bg-red-900 added to the safelist.