3 ms·
You should think of Tailwind as you would think of CSS shorthand classes (and not as an abstraction as the author misunderstands). In CSS, there are lots of sh
by sam_goody 4y ago
You should think of Tailwind as you would think of CSS shorthand classes (and not as an abstraction as the author misunderstands).
In CSS, there are lots of shortcuts: `margin: 0 56px 10em`,
`background: #ffffff url("img_tree.png") no-repeat right top;`, `font: italic small-caps bold 12px/30px Georgia, serif;`, etc.
You often have to reference the order and style of the rules. You cannot use them in all cases, and you may need to merge these shortcuts with regular rules.
But to call shortcuts a leaky abstraction that you hate is simply stupid.
Tailwind is a bunch of shortcut CSS rules. You may have to reference the docs as you get used to it, you cannot do everything with it, and you should mix it with other CSS.
But on the other hand, it makes your code much more readable, consistent, and easy to get out the door. Well, well worth the effort to integrate. Not worth bowing down to.
Shameless, but relevant plug:
Tailwind had, IMO, one major shortcoming, and that was no support for children/descendant/children. That was kinda fixed with arbitrary selectors, but I still recommend my tailwind-children[0] library to everyone.
[0]: https://www.npmjs.com/package/tailwind-children https://www.npmjs.com/package/tailwind-children