Re:Why Tailwind CSS Won
by progx on Wednesday August 16, 2023 @07:31AM
(#37145473)
And you write this crap `class="my-4 mb-sm-5 mb-lg-6"`hundreds of times in complex applications or `class="foo"`?
[ Parent
| on HN ]
How many components in your application actually need the exact same layout tweaks in every use instance?
There are some properties of CSS that are more static across screen sizes. Colors, borders, backgrounds, font-size (debatable!), animations, and maybe even some high level layouts (12 column grid, etc).
The rest of CSS is minute positioning via padding, margins, and widths. Often you need to customize those details to use slightly different values dependent on context within the application itself. This is where utility classes shine.
Do you practice atomic design? It shouldn't be an issue for you if you do
Re:Why Tailwind CSS Won
by quickthrower2 on Thursday August 17, 2023 @10:08PM
(#37170702)
I love tech’s endless fixes for self-induced problems.