Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And you write this crap `class="my-4 mb-sm-5 mb-lg-6"`hundreds of times in complex applications or `class="foo"`?


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


I love tech’s endless fixes for self-induced problems.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: