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.

Is there too much CSS now?

127 pointsby daemondover 2 years ago

33 comments

bob1029over 2 years ago
No. It&#x27;s finally getting to be reasonable. The hackarounds are being displaced in droves now.<p>Ever since CSS grid became a thing, I dumpstered all of the 3rd party web framework stuff I had been using. Placing elements in the right parts of the viewport (across all target devices) has always been 95% of the reason I consumed 3rd party libraries.
评论 #33511418 未加载
评论 #33508734 未加载
评论 #33509719 未加载
评论 #33508877 未加载
politelemonover 2 years ago
Too much CSS, possibly.<p>Too much cognitive load, definitely, I do think so. As a whole, modern CSS features feel unintuitive and often require a historical knowledge of the problems this new feature X was trying to solve, which means to me, it&#x27;s laden with baggage. Some new CSS feature pages on MDN are absolutely gigantic in their explanations, and that means that there is a lot of &#x27;talking&#x27; required to overcome its unintuitive nature. Of course, once you start using it, it becomes just another tool.
评论 #33509022 未加载
评论 #33509599 未加载
评论 #33508783 未加载
评论 #33509804 未加载
DerekBickertonover 2 years ago
CSS has become like a scripting language now. You can do things like nested CSS[0], keyframe animations[1], calc operations[2], etc<p>It has become very JavaScript-like and this is why I always try to see if I can do something in CSS <i>first</i> before I resort to JS.<p>[0] <a href="https:&#x2F;&#x2F;www.w3.org&#x2F;TR&#x2F;css-nesting-1&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.w3.org&#x2F;TR&#x2F;css-nesting-1&#x2F;</a><p>[1] <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;@keyframes" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;@keyframes</a><p>[2] <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;calc" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;calc</a>
评论 #33508541 未加载
评论 #33509261 未加载
评论 #33511903 未加载
评论 #33511781 未加载
评论 #33508494 未加载
评论 #33509918 未加载
评论 #33509486 未加载
perardiover 2 years ago
There is a <i>lot</i> of CSS now…but so many of the recent additions have been useful. Really useful. Like, solves real-world problems, easy to understand, on their way to being very well-supported.<p>For example…<p>…Container Queries. (<a href="https:&#x2F;&#x2F;www.smashingmagazine.com&#x2F;2021&#x2F;05&#x2F;complete-guide-css-container-queries&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.smashingmagazine.com&#x2F;2021&#x2F;05&#x2F;complete-guide-css-...</a>)<p>…Cascade Layers. (<a href="https:&#x2F;&#x2F;css-tricks.com&#x2F;css-cascade-layers&#x2F;#browser-support-and-fallbacks" rel="nofollow">https:&#x2F;&#x2F;css-tricks.com&#x2F;css-cascade-layers&#x2F;#browser-support-a...</a>)<p>…the :has() selector. (<a href="https:&#x2F;&#x2F;www.bram.us&#x2F;2021&#x2F;12&#x2F;21&#x2F;the-css-has-selector-is-way-more-than-a-parent-selector&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.bram.us&#x2F;2021&#x2F;12&#x2F;21&#x2F;the-css-has-selector-is-way-m...</a>)
评论 #33510107 未加载
rgloverover 2 years ago
The youngins&#x27; have no idea how good they have it. I&#x27;m an IE6 veteran and comparing now to then, today&#x27;s CSS is a dream.<p>I think most people dislike it nowadays because it requires two skillsets: visual creativity and technical aptitude (most people can only fulfill one of those halves).<p>It can be easy to project shortcomings in visual creativity onto the language which I don&#x27;t think is very fair but I tend to see often being at the root of people&#x27;s dismissals of the language.<p>If you&#x27;re just taking designs from someone else and implementing them, the CSS part of front-end is comparatively <i>easy</i> to what it was just a decade and change ago. It&#x27;s still not perfect (and never will be with competing browser vendors&#x2F;rendering engines), but the time investment to implement complex designs is substantially less than it was. That&#x27;s a win.
评论 #33515389 未加载
karaterobotover 2 years ago
I don&#x27;t think so. New CSS features are pretty low overhead to learn, and save me a ton of time. I used to use all those black magic tricks they mention at the beginning of the article, and it was <i>way</i> harder to create layouts back then. Not even close. Adding more features has mostly just made it easier, so it&#x27;s worth the tradeoff.
pornelover 2 years ago
On the upside, all the basic properties and selectors work now across browsers. You don&#x27;t need to know about hasLayout, mysterious 3px margins or inline-table hacks. If you don&#x27;t follow the latest hotness of the week, you can develop in one browser, then just quickly check in a couple of others, and 99% of the time it&#x27;s fine.
评论 #33511813 未加载
Mikeb85over 2 years ago
Nope. Flexbox makes it easy to just use plain CSS nowadays. No more SASS or any other preprocessor nonsense. Not even a fan of Tailwind (too much complexity for dubious benefit).<p>CSS has never been better and now there&#x27;s just the right amount of it. Also now that there&#x27;s no more need for crazy JS hacks, you can have <i>just a little bit</i> of JS for interactivity and that&#x27;s it. Front end development is finally pleasant again.
评论 #33517232 未加载
评论 #33515395 未加载
grepLeighover 2 years ago
No, it&#x27;s amazing what you can accomplish with CSS now! You used to have to listen for user events with Javascript (later jQuery, around 2006) to add&#x2F;remove CSS classes. There was no :hover :focus etc.<p>Today, CSS pseudo-classes cover just about every transition state you need when designing a web application.<p>I appreciate the approach frameworks like Tailwind are taking to CSS. At first I found it awkward to include so many classes in my markup, but I&#x27;ve come to appreciate the flexibility (without surprising behaviors).<p>10 years ago, I caused all kinds of headaches for myself by trying to customize .btn with crap like a#sales-promo-1.btn a#sales-promo-2.btn - truly a mess.
评论 #33511380 未加载
评论 #33511436 未加载
评论 #33511316 未加载
danielovichdkover 2 years ago
I have been away from css for many years but then the last month I was tasked with helping a junior developer understanding web dev.<p>It has been an amazing journey only to learn the language has evolved gracefully and with a delicacy I really like.<p>Working with alignment of layout and positioning is much easier. It&#x27;s implemented nicely.<p>Another really great thing about css imo is that it has no competition or the same crazy amount of libraries as javascript.<p>I like where its going.
djfobbzover 2 years ago
I’m personally more annoyed at the SVG pollution in modern day frontends. I’m not saying I hate SVGs but why in the heck are we producing 10k like html files by incorporating SVG paths directly into the HTML? There should be a standardized browser protocol to be able to insert SVG via filename and pass it any styling references.
评论 #33509784 未加载
tonerowover 2 years ago
Since this went by the HN wayside earlier today I thought I would share it amongst people with thoughts on CSS. I made a very absurd hommage to CSS (the language, itself) over the weekend - <a href="https:&#x2F;&#x2F;css-magnetic-poetry.tone-row.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;css-magnetic-poetry.tone-row.com&#x2F;</a><p>Definitely not too much CSS IMO. It&#x27;s a language in flux for sure, but as someone who has been doing frontend for more than a decade, I would rather have 5 ways to accomplish something than 1 way that&#x27;s a hack and only works on some browsers.
tylershusterover 2 years ago
This article seems to think the CSS <i>spec</i> is too big, which I don’t think is the case. We should be able to access lots of rendering options via CSS. But CSS <i>stylesheets</i> are definitely way too big.
评论 #33508162 未加载
评论 #33508164 未加载
评论 #33508534 未加载
jhp123over 2 years ago
there&#x27;s a very old argument in computer science between minimal standards and &quot;batteries included&quot; standards — RISC vs CISC, C vs C++, scheme vs common lisp, Algol W vs Algol 68 etc.<p>The web community, for whatever reason, is <i>firmly</i> in the &quot;batteries included&quot; camp. CSS alone is approaching the number of built-in symbols as a &quot;big&quot; language like common lisp or Perl. New features are always loudly celebrated, even if they overlap with existing features, are very complicated, and&#x2F;or serve very niche use cases.<p>Personally I think we need a &quot;scheme&quot; for the web — a little language that handles all the important pieces (layout, interaction, accessibility) with as little surface area as possible. It would be easier to learn, easier to understand others&#x27; code, easier to implement.
评论 #33508867 未加载
评论 #33509350 未加载
tpmxover 2 years ago
The web standards stack has become too large, period. Google has way too many people working on Chrome&#x2F;Chromium. CSS is a relatively small part of the insane strategic complexity they have orchestrated.<p>By the way, it would interesting to know how many they are now. Has anyone done any stats via Git lately? It was 2000+ in 2015 or so, iirc.
stemlordover 2 years ago
The css tricks website definitely has always had <i>way too much</i> css. Imo a very jarring user experience that often had me hitting the back button and clicking the adjacent w3schools article for whatever &quot;css trick&quot; I was searching for.
tiborsaasover 2 years ago
&gt; And that’s where I, myself, land in the end. I’ve made my peace with the fact that I will probably never use — or even know about — all possible CSS features.<p>Do painters also complain that they are not using all possible colors, shapes and techniques?
notmysql_over 2 years ago
Previous Discussion (22 comments) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33455993" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33455993</a>
ohCh6zosover 2 years ago
Yes, because the whole web has become infected with the server side dictating rendering for you instead of just delivering documents and letting the user render how they desire.
评论 #33529134 未加载
评论 #33509135 未加载
tannhaeuserover 2 years ago
1. CSS should&#x27;ve been split into app-y styles and doc-y styles a looong time ago; meaning that when you need JavaScript to make use of a feature anyway, there&#x27;s no point in using CSS and it&#x27;s better to set styles, layout using JavaScript rather than bloat CSS. The Houdini API was on the right track years ago.<p>2. The CSS WG at W3C must deliver formal specification rather than the prose they&#x27;re writing up now. For an idea how a (partial) formal spec for CSS rendering looks like, see eg. [1], [2] (with limitations).<p>The one way complexity that both W3C and WHATWG have delivered over the past 15 years with complete lack of mental discipline due to financial dependency&#x2F;job security will be a major source of confusion for generations to come, and will not be looked at favorably.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;uwplse&#x2F;cassius" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;uwplse&#x2F;cassius</a><p>[2]: <a href="https:&#x2F;&#x2F;github.com&#x2F;lmeyerov&#x2F;sc" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lmeyerov&#x2F;sc</a>
Julesmanover 2 years ago
This take is a disaster. So we get a decade of bloated frameworks to compensate for missing properties and then just when browsers are about to catch up and make all that cruft pointless we get people complaining about it. This isn&#x27;t a thing. This is some software engineer edgelording. Yeah, we get it, you don&#x27;t like CSS because you aren&#x27;t good at it. Just stop.
评论 #33508426 未加载
评论 #33509344 未加载
评论 #33508497 未加载
评论 #33512260 未加载
SadWebDeveloperover 2 years ago
This is half-empty vs half-full glass of water problem... let me explain.<p>CSS is bloated because it needs to be bloated, do you remember the days before CSS? no, well we use to relay a lot from the HTML Spec (thats why some ppl kept pushing for some weird things like xhtml), we had to put in the all the elements HTML all the styles for every element on the website (and it wasn&#x27;t like today that you put style tag and of you go), we had specific pourpose html elements (marquee, center, etc) to do certain things and it was a mess, as soon as CSS was available every developer started demanding it, Microsoft&#x2F;IE couldn&#x27;t keep up with the other browsers so he delivered a half-assed implementation (because they were pushing for activex&#x2F;com shenanigans), that&#x27;s were the infamous &quot;css hacks&quot; were born, because every major browser were luring users with features that devs had to support if their website aimed to be worldwide accessible, m so old for this shit that i remember Opera being loud on the ACID thing, it even went to my school to promote the CSS level support.<p>Now lets get back to 2022, all browsers politically agree to implement the things everyone wants, there are still half-assed solutions and workarounds (for older browser support, mainly Sucksfari), but the browser wars are over the winner was webkit=&gt;chromium, now we live in the post war era, nobody wants to touch anything old because it might break the internet (and start another browser support war), so they keep pushing for new things build on top of old things (thats why we have a confusing state of what is better flex vs grid or the fact that we still need a css reset) because some old website (facebook, google, microsoft, etc.) has a vote on the w3c&#x2F;whatwg table.<p>The solution? you might not like... lets break the internet, start deprecating the things and start promoting the new ones. Lets get rid of Safari!
yamtaddleover 2 years ago
Oh god, yes. It&#x27;s an overlooked culprit (though far from <i>the only</i> culprit, obviously) in web performance and resource use being clown-shoes. We used to be aware that using some CSS features had a serious resource cost on the client side and keep things halfway sane, but it never comes up anymore, while we&#x27;ve added even more ways to eat resources with it.
jonny_ehover 2 years ago
As long as I can google &quot;how to do X with CSS&quot; and I get a straight-foward answer (usually from css-tricks) I&#x27;m happy.
评论 #33508514 未加载
throw_m239339over 2 years ago
I still remember a time where CSS pundits claimed that the box model was &quot;simple&quot; and if you didn&#x27;t understand how to make a layout with &quot;float&quot; you were an idiot.<p>There is a reason why people resorted to tables at the time, because tables were simple to reason about. Grids are kind of tables 2.0 and that float stuff was never good nor simple. So F. you to all the people all these years that claimed there was nothing wrong with CSS, float layouts were a hack and it was bad.<p>CSS is now actually much much simpler than it used to be, all you need to know as a developer is basically flexbox and&#x2F;or grids to make beautiful layouts.<p>CSS can succeed where the DOM failed: CSS can become a great tool that makes using CSS frameworks _unnecessary_, it just needs some kind of module system for scoped CSS rules, which AFAIK doesn&#x27;t exist in the spec yet.
seydorover 2 years ago
I wonder where it goes from here. Maybe at some point the whole thing will implode, and chrome will come up with a simpler skinning toolkit and people will start using that one and css gets forgotten
racl101over 2 years ago
Being a backend web developer, for the longest time I felt I could get by using CSS frameworks but now it&#x27;s so bloody complicated even with the framework.<p>While I&#x27;m glad that CSS is more expressive and hacks are becoming a thing of the past I feel that it is a discipline that I can no longer half ass.
评论 #33509076 未加载
irrationalover 2 years ago
&gt;This may seem like a negative attitude, but I think it’s understandable. Nobody can be expected to keep up with so many new features!<p>I have similar feelings about javascript. But, I figure I can ignore all new features and worry about learning them when the need for them arises.
pjmlpover 2 years ago
Yep, that is why I hanged my boots for Web FE development, no way to master it without being a full job, long gone are the days when could do well sites end to end.<p>At least I can have fun with WebGL&#x2F;WebGPU, even if they lag behind native 3D APIs.
laaczover 2 years ago
It looks like the same fatigue kicking in, which many (me including) got from the immense pace at which frontend development world revolves.
conaclosover 2 years ago
One missing thing is the possibility to deprecate old features and change default behavior. A king of edition could be really nice to have.
antics9over 2 years ago
Yes. Why?<p>I&#x27;m going on a stretch here and say that the html part of the interwebs is transitioning back to simpler and less dynamic hypertext documents with a lot less UI fluff. The strength of html are it&#x27;s textual hypertext capabilities.<p>Also, with Webassembly I do not see the point of expanding the UI capabilities of html.
mungover 2 years ago
And yet styling form elements is still pretty limited.