Re:Show HN: Tailwind.run – An Online Playground for Tailwind...
by danchristian on Friday August 09, 2019 @01:19PM
(#20656389)
I think you have misunderstood the implementation. If you want all buttons to have a bit more padding then you either change the padding class on each button from .p-1 to .p-2 or, more likely with something like buttons, you abstract the styles into a .button class and then you can make a singular change to the padding and it will affect all your buttons.
[ Parent
| on HN ]
Re:Show HN: Tailwind.run – An Online Playground for Tailwind...
by hisnameisjimmy on Friday August 09, 2019 @02:33PM
(#20657116)
The first one is a find and replace nightmare on any sufficiently large project and akin to inline styling. The second negates the point of utility classes.
Re:Show HN: Tailwind.run – An Online Playground for Tailwind...
by antonkm on Friday August 09, 2019 @02:58PM
(#20657313)
No, it does not. They're not exclusive. I've written large pages that pretty much only used component classes for pills and buttons, with Tailwind using @apply. All the other elements used utilities. Paired with purge-css you get small CSS bundles and really quick styling.
You'd often use something like a component based JS framework or a server rendered templating language, making it easy to contain all utilities with shared logic in one place.