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 vs. JavaScript: Trust vs. Control

2 pointsby openmazealmost 8 years ago

1 comment

z3t4almost 8 years ago
I did think about replacing CSS with JavaScript for a while, but CSS actually works very well for modules, because it&#x27;s cascading effects. For example h1.someClass takes precedence over .someClass and .someClass takes precedence over h1 which is not very intuitive. But you can get very effective in CSS once you learn how that works, and never have to use !important again. But it&#x27;s also very important that the one who writes the CSS understands it, or it will be a total nightmare to edit.<p>It&#x27;s also very powerful to be able to change the design by just replacing the css stylesheet. For modularity you can load CSS just like loading modules using require.