3 ms·
I believe there are two problems Tailwind tries to solve: styling and layout. For laying out items it might be useful but for styling it is not (why would you
by tdudhhu 3y ago
I believe there are two problems Tailwind tries to solve: styling and layout.
For laying out items it might be useful but for styling it is not (why would you create a separate component for each HTML element, like a button!?).
And I even don't get the styling example in the article.
Why would you use a 'primary' class on a button while the button type makes it primary?
If you style your submit button with `button[type=submit]` you are sure all submit buttons in your app look the same. There is no need to use classes.
(I also never understood why it is common to add a 'table' class to a table.)
I think the main reason why most CSS files become such a mess is that style and layout are not separated.
- JLehtinen 3y agoSeveral reasons to use "primary" class for buttons – `button` is just one of the elements that gets used with button styling, but there might also be `a`, `div` or `input` tags that look like buttons, depending on the use (or source).