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.

Functional CSS – The Good, the Bad, and Some Protips for React.js Users

3 pointsby chibicodealmost 9 years ago

1 comment

levbriealmost 9 years ago
I expected to hate this but I love it already. I'm not on the all-functional all-the-time bandwagon. I go functional when it suits what I'm building. But working with CSS is broken for many of the reasons that chibicode outlines - semantic css encourages specializes classes that end up duplicating lots of css properties. The functional CSS proposed here obviously isn't a complete solution - although it may be the case that "If you use functional CSS, when you add something new to a page, you'll rarely write any new CSS", you have to pay for it in all of the classes that you write. I've seen really well-structured SASS files that end up keeping duplication and class names to a minimum, but it's hard to do. I'm anxious to try this for myself and see how the tradeoffs play out in a real codebase.
评论 #12265524 未加载