The Future of CSS

soheilpro 171 points 57 comments October 21, 2026
www.joshwcomeau.com · View on Hacker News

Discussion Highlights (20 comments)

FDEUp

Say it with me: Broad support for new CSS features is GOOD. Making BASIC SITE FUNCTIONALITY depend upon new CSS features is bad.

CharlesW

Since I’m in before the negativity: I love CSS! For whatever reason, it’s always made sense to me. I have great respect for everyone with the tenacity to push on improvements that might take 5-10 years to be in common use, if at all.

jamienk

Still can't tree shake. It's what makes my old css files grow into monsters. I feel like everyone has given up on this.

lopsotronic

Been waiting a long time for CSS inherit() . . . although I freely admit that (and CSS Functions) open a respectable-sized can of worms. Sort of like what transclusion and conditionals do for document markup. Anchor Positioning would be sweet and doesn't feel like it's got so much baggage.

lioeters

Do we really want functions in CSS? I guess that ship has sailed a while ago, since CSS reached Turing completeness. /* Define a function: */ @function --gradient-to-transparent(--color, --direction: bottom) { result: linear-gradient( to var(--direction), var(--color), transparent; ); } Why not provide better integration with JavaScript, to make this kind of acrobatics unnecessary.

afavour

I’m part of the seeming minority that really enjoys working with CSS. And the way I use it today is so different than I did a few years back, e.g CSS modules, declaring a palette with variables then changing it for dark mode… it’s genuinely great to work with.

koolala

The new responsively-sized iframes standard is an exciting one for me not mentioned. It's finally a step beyond the original frames and framesets. It will let us design sites out of iframes as building blocks instead of needing to use web components. Websites made out of websites.

herpdyderp

A bit strange to me how Josh beings with heralding the browsers working together and then every mentioned feature is Chrome only. They're nice previews for a potential future I suppose!

alberth

Maybe I’m alone, but all of those suggestions seem to make CSS needlessly complex (or more like JS). Especially functions. Makes me think of a previous post from the author, who wrote 100k lines-of-code to power their blog. https://www.joshwcomeau.com/blog/how-i-built-my-blog-v2/

asdfsa32

HTML and CSS are like bash, no one would use them if it wasn't for the fact that it is everywhere.

paczki

As someone who actively goes out of my way to stick to writing vanilla HTML/CSS/JS as much as possible, it's honestly hard to explain to people who only write within frameworks how good it's gotten. Use the proper tool for the job, of course, but it sparks joy!

watersb

The discussion here reminded me of one of my favorite demos, someone live coding Qt5 and QML on a first a generation Raspberry Pi, 1080p HDMI. Sort of a mashup of CSS and JavaScript for simple shaders. Fourteen years ago. https://youtu.be/0j-Wakm5B84?is=7dU_EvFyk_nQNwjO It's like a peek into a CSS future from a different timeline. Something we could have had.

slopinthebag

this is like the webdev version of the c++ people who love talking about how great the modern version of their language is, ignoring the fact that all the bad stuff is still in there... remove inheritance and cascade from css and then we'll talk. but for now ill stick to tailwind.

kumarvvr

I am very much excited for the future of CSS. And I love that functions are a part of it. I spent 3 months this year testing out a reporting system for large quantities of dynamic data. My requirement was to generate pdf reports, but didn't want any reporting tools and installations. Especially something like Microsoft Excel, which the old system was based on. After a lot of tests and proof-of-concept apps, I finally zeroed down to simple, pure, self contained html, that I am generating from a python script. And it's glorious. I am generating interactive charts when the html is viewed in the browser, and hiding all of them and only printing static svg images when in print mode, using css media print queries. And there is so much more. The format is awesome for ingestion by ai models.

manlymuppet

Is there any implementation proposal which exists that makes relative corners automatic? If you want them now, you have to do sort of verbose and clunky calculations to get outer corner radius. [Outer Radius = Inner Radius + Padding]( https://www.reddit.com/r/Design/s/oal9fZclJS ) This seems like something standard enough to be a built-in feature.

astrod

I forgot about functions! I always thought that everything from Sass was pretty much ported over by now.

sneak

CSS was done a long time ago. Stop changing it.

thibran

The future of HTML/CSS and hopefully JavaScript is, that it no longer used and replaced by a new technology stack. Especially CSS is such a miss fitting technology for what it is used today, that web frameworks actively fight it, by trying to keep its scope to components. When looked at web tech from a distance, it is cristal clear to me that we need something new. Instead of all the abysmal complicated rules of CSS, we would probably be much better served by something like ElmUI (a modern advanced version of the idea) + some scripting for dynamic things.

shevy-java

In general I like CSS, but ... a) they keep on making CSS more and more complex. You can reason in favour of it, of course, but it is undeniable that CSS becomes more and more complex - and complicated, too. Which leads us to b) b) "CSS Subgrid is a good example. Subgrid is a super-powerful extension to CSS Grid which enables entirely new layouts." Well ... I wanted two flexible divs side by side. It is possible, but there are like 5 different main strategies for this, grid is one of them. Now via a "subgrid", they acknowledge that the existing ways SUCK. So they add yet-another-component here. This reminds us of: https://xkcd.com/927/ I started to go back to oldschool - HTML tables. People can hate it, but they work really almost flawlessly. I am not saying I use them for everything, but I totally changed my mind after I saw how flexbox and other things SUCK to no ends. So I now compare all of them to HTML tables. If they suck more than HTML tables, I discard them. This is my quality metric now. And a lot of this has to do with developers making these decisions, failing hard at DESIGN. What happened to simplicity? HTML tables are simple for the most part; they are kind of like a grid already.

unsupp0rted

> If you’re familiar with JavaScript, this should feel pretty familiar. We define new functions with @function and specify the returned value with result. It used to be that HTML was for content, CSS was for layout, and JS was for "code" Now JS is for content and layout and code, HTML is for content and layout, and CSS if for layout and code

Semantic search powered by Rivestack pgvector
10,084 stories · 95,083 chunks indexed