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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

You suck at CSS and that's okay (2022)

41 点作者 kyleyeats2 个月前

17 条评论

ZYbCRq22HbJ2y72 个月前
Tell that to a decent number of people I have worked with over the past 20 years. In fact, I know people to this day who have been writing CSS for decades who don&#x27;t really know fundamental things like specificity, inheritance, or the cascade. Pattern matching into the sunset, not a single fundamental piece of CSS specifications ever internalized, still getting paid (its okay).<p><a href="https:&#x2F;&#x2F;www.w3.org&#x2F;Style&#x2F;CSS&#x2F;specs.en.html" rel="nofollow">https:&#x2F;&#x2F;www.w3.org&#x2F;Style&#x2F;CSS&#x2F;specs.en.html</a><p>You can read this and know most things about CSS. For a bit anyway. You&#x27;ll forget things you don&#x27;t use. You might remember them again one day.
评论 #43328092 未加载
评论 #43327924 未加载
评论 #43328285 未加载
tombert2 个月前
I never got very good with CSS or HTML styling. I know enough to generally fix obvious stuff, but I&#x27;m kind of a luddite and still use Bootstrap for most of my stuff. I&#x27;ve mostly stopped doing web stuff, so the only time I touch CSS is when I&#x27;m doing an admin screen or something, so it doesn&#x27;t have to look great.<p>Still, a part of me wonders how different my life would be if I had taken to frontend programming enough to make things that look nice. It&#x27;s not like there isn&#x27;t anything enjoyable about it, I just ended up taking to backend distributed systems work a bit sooner.
评论 #43327441 未加载
评论 #43327453 未加载
boyter2 个月前
I detest writing CSS and HTML. I just find it boring fiddly and annoying. I have started doing &quot;vibe&quot; coding with LLM&#x27;s. Giving a decent prompt produces results that are... pretty good.<p>Almost 100% in lighthouse for both mobile and desktop, responsive, reusable components, dark&#x2F;light mode and a design that was better than I could do in the 2-3 hours I spent doing it (while sipping wine).<p>I know its not a solution for everyone, and probably won&#x27;t work for the prettier designs out there, but you can go a long way with these tools this day.<p>I know there is a reluctance to not use LLM&#x27;s for code tasks, and I am one of the largest critics, but for me this solves a real pain point. I don&#x27;t want to write CSS&#x2F;HTML anymore and these tools do a good enough job of it that I don&#x27;t have to.
评论 #43327975 未加载
评论 #43327391 未加载
nativeit2 个月前
HN Confessional: I wrote a custom theme for my server management software a few years ago that&#x27;s basically just a rewrite of the stock theme&#x27;s rather large CSS file. Among a little more than 1200 lines, I include `!important` <i>175 times</i>. I imagine that causes hives among our more discerning front-end devs.
评论 #43327947 未加载
bigbuppo2 个月前
And the fix is another framework, because of course it&#x27;s another framework. Frameworks are to CSS what greige paint is to a house. Trying to implement the missing 5% of a CSS framework without knowing how to implement &quot;complex&quot; CSS from the ground up means you are never implementing the missing 5%. Your site or app or whatever is just going to look like every other site that uses that framework.<p>Now that CSS is more or less feature complete and the fact that there&#x27;s just one web browser means you don&#x27;t need the clever tricks rolled up in a framework to center a div or to have a grid layout that works without resorting to tables. It&#x27;s literally part of the CSS spec and has been implemented in every browser for a decade now.
评论 #43328015 未加载
haburka2 个月前
&gt; The last big driver of time-wasting in CSS is the drive for pixel perfection<p>I agree. Also users&#x2F;product managers do not care. They will see UI that is a little bit “off” and think negatively about your brand. Congrats, now you have a ticket to make the UI look pixel perfect.<p>I suppose the audience for this isn’t people who actually get paid to write CSS, but instead casual blog writers. It’s definitely ok and normal to have little blips on your side project.
评论 #43327358 未加载
评论 #43327955 未加载
评论 #43327308 未加载
评论 #43328243 未加载
sampton2 个月前
I recently started a green field project using copilot and tailwind. I’m blown away by how good ai is with css. I’m just glad no one has to try wrestle with css like we did back in the days.
评论 #43327574 未加载
评论 #43327588 未加载
gnabgib2 个月前
(2022)<p>You&#x27;ve turned your&#x2F;rriepe&#x27;s substack series (<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;from?site=yousuckatcss.substack.com">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;from?site=yousuckatcss.substack...</a>) into a book? Or actually maybe it&#x27;s the other way around (based on rriepe&#x27;s profile[0])<p>[0]: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;user?id=rriepe">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;user?id=rriepe</a>
评论 #43327288 未加载
froginspector2 个月前
I am not convinced anyone is truly good at CSS unless its their only job
appleorchard462 个月前
I enjoy working with CSS immensely. It takes some thought to get things right from the beginning, but I find it&#x27;s always clear what can be done to improve it.<p>With modern features like CSS nesting, anyway; just a few years ago when IE support and whatnot was more relevant it was a different story. Now you can just throw everything into a flexbox.
CottonMcKnight2 个月前
CSS is a language, but it is 0.1% syntax and 99.9% memorizing the standard library, which expands monthly.
pupppet2 个月前
The worst part of CSS is trying to come up with the class names.<p>.every-stupid-ass__naming-scheme-falls-short{}
评论 #43327926 未加载
skipps2 个月前
The CASS site on iOS WebKit has bullets overflowing into the border and a mix of fonts that doesn’t look great:<p><a href="https:&#x2F;&#x2F;casscss.github.io&#x2F;cass&#x2F;" rel="nofollow">https:&#x2F;&#x2F;casscss.github.io&#x2F;cass&#x2F;</a>
评论 #43327899 未加载
kayodelycaon2 个月前
There’s a reason everything I’ve done in the last 5 years uses bootstrap. And doesn’t have to look like bootstrap. Our internal graphic designer loathes bootstrap and didn’t recognize I had used it until I told them.
kazinator2 个月前
Just try not to be better at CSS than the latest version of any major browser.
firefoxd2 个月前
Hot take: you suck at CSS because you never bothered learning it.<p>A long time ago, everyone in my team kept making excuses why they hate css. I went to Lynda.com and found a pretty good class. I can&#x27;t remember the instructor, but it was so good that I still use the same patterns more than a decade later. I tried to get the whole team to take it, but no one wanted to. &quot;It&#x27;s a waste of time&quot;, &quot;It&#x27;s not even a programming language.&quot;<p>They built all kinds of tooling around css, trying to avoid css. We had dormant css that no one could ever figure out if it was used, we had important and position absolute everywhere. Today, it&#x27;s not so different. You see divs with 20 or 30 classes in them.<p>Just learn css. Any class is better than no class.
评论 #43331210 未加载
评论 #43328316 未加载
sunami-ai2 个月前
My view is that those who designed CSS suck when it comes to designing intuitive systems.<p>I would not advocate constraint solvers, in the future I hope ViTs are so cheap to run that they can infer the right layout of things at any orientation and size in single digit milliseconds, solving the layout problem for good =)
评论 #43328362 未加载
评论 #43328144 未加载