Utility CSS frameworks are my favorite but I understand why it turns some people away. My second favorite approach is BEM with light use of SASS to make the nesting clear. If I see things like functions in SASS I consider that to be too much for my taste.
The main benefits of utility first CSS for me is:
Your CSS files tend to not grow very large because you reuse the same code over and over.
Everything has the same specificity. This point can not be overstated. I have ran into so many codebases where I have to write some ridiculous CSS that just adds mental fog for everyone that reads it because I have to override that ul > li + a.some-class selector.
No more trying to make generic class names that mean nothing like .container just so you can reuse it in multiple places and still have the class make sense.
I understand this is a holy war, and I'm really not trying to argue with anyone today, tomorrow, or the next day. All the approaches of writing CSS can be made to work.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Utility CSS frameworks are my favorite but I understand why it turns some people away. My second favorite approach is BEM with light use of SASS to make the nesting clear. If I see things like functions in SASS I consider that to be too much for my taste.
The main benefits of utility first CSS for me is:
I understand this is a holy war, and I'm really not trying to argue with anyone today, tomorrow, or the next day. All the approaches of writing CSS can be made to work.