They are not the same. Margins and paddings can be configured to use a different base size (5px instead of 0.25rem). Colors can be configured freely, and with a centralized config. Kinda like inline Strings vs constants.
But there‘s more important benefits (IMO):
- Media queries are done inline and become ridiculously easy to read
- Light/dark mode colors and selectors are done inline
- Gradients are easy as pie and actually readable
- Built in grid system
- Your code is somewhat future proof - if the idiomatic code for a gradient changes, you only need update your Tailwind version
But there‘s more important benefits (IMO):
- Media queries are done inline and become ridiculously easy to read
- Light/dark mode colors and selectors are done inline
- Gradients are easy as pie and actually readable
- Built in grid system
- Your code is somewhat future proof - if the idiomatic code for a gradient changes, you only need update your Tailwind version
- Plugin system for custom code generation