TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

3 点作者 chibicode将近 9 年前

1 comment

levbrie将近 9 年前
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 未加载