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.

Ask HN: Is CSS in JavaScript worth it?

2 pointsby Philomathabout 5 years ago
I&#x27;ve read dozens of articles where people compare different CSS in JS solutions, but very very few actually explain WHY you should switch to CSS in JS in favor of just plain old CSS.<p>I am doing a lot of frontend development with javascript and I am still not convinced that having my styles in the javascript is worth it.<p>I hope someone can explain me why, in their experience, switching to CSS in JS was a good decision.<p>I find that having a strict naming convention in your css classes you can go very very far, without the need of making your js bigger and more complex. And if your problem is that CSS doesn&#x27;t have a local scope, there&#x27;s fixes for that too.

no comments

no comments