Tailwind CSS v4 Best Practices Quick Reference Vite Plugin Setup : CSS Entry Point : @theme Inline Directive : Key Differences from v3 | Feature | v3 | v4 | |---------|----|----| | Configuration | tailwind.config.js | @theme in CSS | | Build Tool | PostCSS plugin | @tailwindcss/vite | | Colors | rgb() / hsl() | oklch() (default) | | Theme Extension | extend: {} in JS | CSS variables | | Dark Mode | darkMode config option | CSS variants | @theme Directive Modes default (standard mode) Generates CSS variables that can be referenced elsewhere: Note : You can also use explicitly to mark theme val…