Hacker News new | ask | show | jobs
by hmexx 2141 days ago
Has anyone considered using utility-style CSS combined with semantic class naming? Example:

  <div class="profile-card"></div>
  .profile-card {
    @include tailwind-css-1
    @include tailwind-css-2
    ...etc...
  }
This way your html has semantic classes but the definition of the classes uses something like tailwind instead of raw CSS. One level of abstraction. Seems the best of both worlds?
2 comments

I mean, isn’t that just writing CSS classes at that point?