The most notable change is in version 4, Tailwind CSS no longer use tailwind.config.ts
configuration file.
To add custom color or other customisation, we define variables under @theme
directive inside CSS file.
/* index.css */
import "tailwindcss";
@theme {
--color-prime-teal: #008080;
--font-poppins: Poppins, sans-serif;
}
There are set of predefined variable prefixes which they call theme variable namespace.
--color-*
--font-*
--text-*
...
Each prefix will generate its corresponding utility classes.
<p class="color-prime-teal font-poppins">Prime Teal</p>