Found out a nice way to have @tailwindcss IntelliSense anywhere in the code.
If you're using `prettier-plugin-tailwindcss` for sorting the tailwind classes, you can also make it work with the `tw` function.
@RaviCoding @tailwindcss You don't need a class regex for this! use the tailwindCSS.classFunctions setting
@RaviCoding @tailwindcss i’d rather make a function that returns itself than add to runtime for no advantage: function tw(s:string) { return s } then just call `tw("something")` two extra characters for one less reduce + trim PER USE
@RaviCoding @tailwindcss Very nice but you should able to leverage clsx that you may be already using and that has highly optimized loops/string concatenation. I grant, you lose ordering but it also opens up some neat tricks. tw = (strings, args) => clsx(strings, args)
@RaviCoding @tailwindcss You could use String.raw instead of a hand-written function, like: export const tw = String.raw; :)
@RaviCoding @tailwindcss NGL this is super creative
@RaviCoding @tailwindcss Huge i had literally just thought of this yesterday evening white defining variants
@RaviCoding @tailwindcss I hope something like this gets into the plugin by default. It just makes so much sense.
@RaviCoding @tailwindcss Instead of function, we could probably do const tw = String.raw
@RaviCoding @tailwindcss I sometimes use the /* tw */ comment trick aswell
@RaviCoding @tailwindcss How can I make screenshot like this?