3 ms·
Well, it's probably faster to write (depending on how good your code completion is). Another benefit is that "bg-blue-500" is globally configurable with [1] th
by gitgud 6y ago
Well, it's probably faster to write (depending on how good your code completion is).
Another benefit is that "bg-blue-500" is globally configurable with [1] themes or configuration files. This means you're not hard-coding colors or sizes (although, yes that's possible with plain old CSS too)
But what's even faster is simply using the utility classes in your components (it looks messy at first) but its extremely fast to write once you know the syntax of the classes e.g. ".p-xx = padding: xxem". Then all your components encapsulate that messiness and it's easy to change.
For example in vuejs, I might make a "btn" component file and style it using Tailwind classes, then the component encapsulates all it's styles but can still be globally configured using tailwind themes.
[1] https://tailwindcss.com/docs/theme https://tailwindcss.com/docs/theme