TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

CSS Utility Classes and “Separation of Concerns”

4 pointsby 3stripealmost 8 years ago

1 comment

dpkonofaalmost 8 years ago
I feel like the examples shows are a little disingenuous. He's ignoring the entire fact that CSS rules cascade and that design has hierarchy. I don't see a functional different between .media-card .media-card__image and .media-card img yet the 2nd is actually semantic and not reliant on specific markup. The biggest difference to me is that .media-card__image doesn't have to be an <img> element and I don't see how that's a benefit.