Use the @utility directive directly in your CSS:
Utilities declared this way work with every variant, so hover:flex-center and md:background-light900_dark200 both compile. Design tokens go in @theme:
asked 1 month ago
1
912
In v3 I had a tailwind.config.js with a plugin that added things like .flex-center. v4 dropped the JS config in favour of CSS. Where do custom utilities go now?
Use the @utility directive directly in your CSS:
Utilities declared this way work with every variant, so hover:flex-center and md:background-light900_dark200 both compile. Design tokens go in @theme:
1
of 1
33
1
40
0