54 comments

  • paczki11 hours ago
    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!
    • yahoosakie11 hours ago
      Yes!<p>I&#x27;ve done the same for years, and it feels a little bit like the IQ bell curve meme, where on the left and right it is like &quot;vanilla HTML&#x2F;CSS&#x2F;JS are all you need.&quot;
      • appplication11 hours ago
        This is an earnest question but is that really true for reactivity and state management? Of course with vanilla is all things are technically possible, but I feel like last I checked this wasn’t something well supported without really knowing what you’re doing.
        • zelphirkalt9 hours ago
          I nowadays build sites (personal websites and projects) that are much more responsive than most things I see online or on a job, just using modern CSS, a little thinking about how I structure my stylesheets, trying to use semantic HTML and not making a div soup. It works pretty well, if used correctly and given the due attention.
          • lucumo8 hours ago
            Responsiveness has been fine for a while. Not surprising with the smartphone revolution being nearly 2 decades old by now.<p>GP asked about reactivity. And that still requires some frameworking, either prebuilt or a lightweight self-written one.
            • oblio6 hours ago
              What&#x27;s reactivity in this context? How quickly a website responds? My personal experience is that fast backends with server side rendered HTML and a bit of dynamic sections are in practice MUCH faster than SPAs, 20 years after using Gmail for the first time. Gmail then was fast, 95% of modern SPAs are slow.
              • abanana2 hours ago
                &quot;State management&quot; is a fancy way to say &quot;your Javascript stores data in variables in some way, which are updated as and when needed&quot;.<p>&quot;Reactivity&quot; means &quot;when those variables change, some generic code already exists to update the DOM instantly&quot;. As opposed to writing specific pieces of code to make those changes directly.<p>Unfortunately, with React, &quot;updating the DOM automatically&quot; generally means: you update the data; React recreates the entire DOM as a new copy in memory; React runs a diff checker to find out what changed from the real DOM; React makes each individual change in the real DOM. With React (or other virtual-DOM-centered alternatives) being used for the smallest of web projects, so many small sites do all that work when the procedure ought to be as simple as: you update the data; you update the DOM directly.<p>It comes down to inexperienced devs not being able to consider which tool is best for the job at hand, and just hammering nails into every web project in the same way.
              • bluecheese45240 minutes ago
                I click the upvote button and a number goes from 0 to 1. Somewhere else on the page a banner gets displayed saying you have upvotes.<p>Your javascript can target those 2 divs, ala doc.getElementById(counter).innerHtml and document.createElement.<p>Like that kind of works for simple stuff. But it gets more complicated fast. Reactivity is when your counter listens for change in the count and updates itself whenever that count changes.
                • zahlman23 minutes ago
                  ... But vanilla JS with the DOM already has event listeners... ?
              • bleuarff6 hours ago
                Reactivity is updating the DOM whenever the underlying data is updated. That&#x27;s one of the most basic reason for existence of all js frameworks. There&#x27;s TC39 Signals proposal to bring that natively, but for now as said above the choice is either use a framework or recreate one. It&#x27;s surprisingly easy nowadays using Proxy.
                • 0xpgm6 hours ago
                  How I&#x27;ve done it is to use some kind of observer pattern, where you register listeners to state changes.<p>Whenever state is updated, the listeners are all called with the updated state and can update the UI and what not based on the new state.<p>I haven&#x27;t profiled this and compared it to frameworks, but feels adequate for the relatively simple UIs I&#x27;ve done.
                • skydhash4 hours ago
                  &gt; Reactivity is updating the DOM whenever the underlying data is updated. That&#x27;s one of the most basic reason for existence of all js frameworks.<p>Most web apps and websites do not have that much state variables (even though it may be a lot of data). So while React may offer a small dev speed boost, it’s consumed by the need to build stuff and a whole deploy pipeline to nurse.<p>Libraries like HTMX and Alpine can take care of most the boilerplate for old style imperative patterns. And backend frameworks like Rails, Phoenix, Laravel donhave their own implementation for data updates.
          • yieldcrv6 hours ago
            I also do stuff wayyy more efficiently than I do on a job<p>But it has no utility<p>Compute is fine and nearly free<p>These are just art projects
        • azangru8 hours ago
          &gt; without really knowing what you’re doing<p>Really knowing what you&#x27;re doing is the implicit part of the right-hand side of the bell-curve meme :-)
        • satvikpendem6 hours ago
          No, it&#x27;s not, despite what other comments here say. Of course it&#x27;s possible but you end up recreating React or another library along the way. JS is getting native signals sometime in the future but for now pure JS is not sufficient for a full, complex app.
          • abanana2 hours ago
            <i>&gt; you end up recreating React or another library along the way</i><p>That&#x27;s always the trotted-out response, most often recited by people who&#x27;ve read someone else saying it but not had the experience to form an opinion for themselves.<p>You absolutely don&#x27;t end up recreating a massive, bloated, slow framework that tries to be as generic as possible to try to be everything to everyone. What you end up creating is a relatively tiny, fast, piece of code that is specific to that site&#x27;s needs. The difference in size, speed and simplicity tends to be absolutely enormous.
            • satvikpendem2 hours ago
              Wrong on both counts. I&#x27;ve worked in companies with vanilla JS only and made parts of those frameworks they ended up building. It is absolutely not &quot;relatively tiny, fast, piece of code that is specific to that site&#x27;s needs&quot; and once we switched to React we actually saw improvements in many parts of the sites&#x27; loading speeds. Next you&#x27;re gonna No True Scotsman me by telling me the company was just bad but I&#x27;ve seen enough examples at other companies to see that using React or a similar framework is simply the right move.
            • reef_sh2 hours ago
              For a large ERP-like back-office where leadership didn&#x27;t want to use an existing reactive framework, I definitely ended up recreating built on top of jQuery ( at the start of the project IE still needed to be supported ).<p>Once you start adding dynamic forms for managing multiple items of different kinds, dashboards, error states, i18n, etc, you either end up with a homegrown framework, or with a lot of spaghetti.
        • JimDabell3 hours ago
          &gt; is that really true for reactivity and state management?<p>No. Use a framework if you want those things. Everything around reactivity, state management, and components have been badly fumbled by the web platform and the various front-end frameworks are far more ergonomic.
        • coldtea8 hours ago
          &gt;<i>This is an earnest question but is that really true for reactivity and state management?</i><p>Yes. We could do those before React and other crap too.
        • 80fj0348i10 hours ago
          1. The tools available in vanilla have improved a lot recently and 2. LLMs have made niche skills&#x2F;knowledge more accessible. SPAs still have their place but the average CRUD app is now really well served by vanilla or lightweight libraries like HTMX.
          • nkmnz9 hours ago
            On the other hand, the average CRUD app doesn’t care about the traffic and rendering overhead of a reactivity library such as Vue. Looking at the boilerplate code needed for basic reactivity that your sibling comment linked to in the Mozilla docs… no, thanks. Just eat the 16kb and have some decent ergonomics.
          • soperj9 hours ago
            CSS was always pretty accessible. You just had to actually care to learn it.
            • zelphirkalt9 hours ago
              True, though it is also true that achieving good responsiveness was not as easy in the past, say 10 or more years ago, without flex box and grid and without calc and clamp and such.<p>I nowadays use flex, calc, clamp, min, max, scoped variables, and even display table sometimes these days and it just works so well. Eliminates almost all hacks.
            • jimbob457 hours ago
              <i>If the rest of you weren’t so stupid, our industry wouldn’t have a problem</i><p>This attitude is why we’re all still stuck writing C++ in 2026. Nobody wants to admit that they’re not hardcore enough to write in poorly designed languages so we never make the effort to improve the situation. We all seem to agree that Zig is an upgrade over C. There’s nothing inherently modern about Zig that we couldn’t have written back in 1995 - we just didn’t because nobody wanted to admit that C is frustrating and clunky, albeit fast.
              • KPGv25 hours ago
                Yeah, people like to talk about how cultish Rust programmers are, but C programmers are so much worse. Just a couple days ago I had one trying to explain to me that all other languages are worse because you don&#x27;t understand what the machine is doing under the hood. Completely ignoring it doesn&#x27;t matter because I have a computer from 2023, not 1986.
                • satvikpendem2 hours ago
                  Case in point: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=50169201">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=50169201</a><p>I honestly didn&#x27;t know people like this still existed, with such strong viewpoints on C.
        • codingdave5 hours ago
          &gt; without really knowing what you’re doing.<p>That is an odd caveat to throw on the end. Sure, to avoid frameworks you have to know what you are doing. Is that really such an outrageous expectation?
          • bossyTeacher5 hours ago
            If people knew what they were doing jQuery, Angular and React would not have existed in the first place. With devs moving companies every two years or so, being able to hit the ground running was very important and you couldn&#x27;t afford to spend weeks or months learning the idiosyncrasies of your new codebase especially when it came to state management. That&#x27;s the main problem frameworks and libraries were solving.
            • chrisweekly2 hours ago
              That&#x27;s not quite right. jQuery was exactly the right tool for those of us who knew what we were doing. Browser inconsistencies in the early days were practically insurmountable without jQuery to provide a consistent API surface.
            • skydhash3 hours ago
              &gt; you couldn&#x27;t afford to spend weeks or months learning the idiosyncrasies of your new codebase especially when it came to state management. That&#x27;s the main problem frameworks and libraries were solving.<p>Not really. Frameworks are usually created to avoid boilerplate and provide some nice scaffolding to support you while you’re coding the business layer. And a lot of them do smooth over accidental complexity, even though the architecture is generic and may hinder you in the future.<p>But the learning curve still exist, as most of what you interact with is custome codes, modules and components.
        • onion2k10 hours ago
          Yep. <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;JavaScript&#x2F;Reference&#x2F;Global_Objects&#x2F;Proxy#manipulating_dom_nodes" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;JavaScript&#x2F;Refe...</a>
        • mb21006 hours ago
          There are JS libs (like Reactive Mastro [1]) that go well with writing otherwise vanilla HTML&#x2F;CSS&#x2F;JS, and there are libs (like React) where you&#x27;re quickly sinking into a mud of abstractions and have to fight the reactivity runtime when you try to write vanilla JS.<p>[1]: <a href="https:&#x2F;&#x2F;mastrojs.github.io&#x2F;reactive&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mastrojs.github.io&#x2F;reactive&#x2F;</a>
          • satvikpendem2 hours ago
            Perhaps put a disclosure that you&#x27;re the one working on whatever you&#x27;re linking.
    • DimmieMan11 hours ago
      Definitely worth keeping up with as a framework user too.<p>Smaller bundles, often easier to use, less bug potential. Code&#x27;s a liability and being able to occasionally rip a bunch out as a feature becomes baseline is always a joy.
    • khalic2 hours ago
      They were too slow, people are all tailwind native now and don&#x27;t know a thing about CSS. I keep seing &quot;full stack devs&quot; complaining about &quot;bleed out&quot; issue, aka C in CSS, cascading
      • salah72521 hour ago
        After Tailwindcss got bought by the child killers I tore Tailwindcss out of everything.
    • lachlanj7 hours ago
      Any good articles or post you could link to, CSS has come so far and I’m trying to gather info on what’s now possible
      • alwillis1 hour ago
        It&#x27;s a little dated, but you&#x27;ll get the idea:<p><a href="https:&#x2F;&#x2F;nerdy.dev&#x2F;cascading-secret-sauce" rel="nofollow">https:&#x2F;&#x2F;nerdy.dev&#x2F;cascading-secret-sauce</a>
    • flohofwoe9 hours ago
      OTH all the complexity ends up baked into the browser where it will be frozen forever (even the shitty&#x2F;overengineered ideas, like WebAudio). At least frameworks can be discarded and replaced when something better comes along.<p>IMHO even HTML+CSS should be completely implemented outside the browser in the &#x27;framework layer&#x27;, but I guess that&#x27;s not a very popular opinion among the more &#x27;conservative&#x27; web devs ;)
      • afavour2 hours ago
        That would mean some shitty load times for even the most basic web site.<p>But there is probably a world where what you’re describing is possible with WASM and Canvas. Would need to solve for accessibility though.
      • Rygian6 hours ago
        If that means having an &quot;HTML+CSS framework&quot; that I could easily swap out for a &quot;Typst framework&quot; and publish my blog using Typst, then sign me up!<p>Meanwhile, there&#x27;s Typst bundles [1], still experimental, that implement the same idea backwards: convergint a Typst project into a set of output files (which can be HTML).<p>[1] <a href="https:&#x2F;&#x2F;typst.app&#x2F;docs&#x2F;reference&#x2F;bundle&#x2F;" rel="nofollow">https:&#x2F;&#x2F;typst.app&#x2F;docs&#x2F;reference&#x2F;bundle&#x2F;</a>
    • sourcecodeplz8 hours ago
      i also found this to be even more powerful today with AI.<p>dont need to import libraries anymore, can just build my own.
    • shevy-java10 hours ago
      Good how and where? That&#x27;s a very uncritical take you have here.<p>I find it is way too complicated with regards to flexbox, grid etc...<p>Just do a google search for flexible divs side by side. Start with two. Then switch to five. Tell me the solutions that work well.
      • nilslindemann9 hours ago
        &quot;flexible divs side by side&quot; sounds like something which can be generated in many ways, From display: inline-block, over float:left, col-columns, flex layout, to a grid based layout. Can what you desire be created in, for example, <a href="https:&#x2F;&#x2F;grid.layoutit.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;grid.layoutit.com&#x2F;</a>?
      • azangru8 hours ago
        &gt; Just do a google search for flexible divs side by side. Start with two. Then switch to five. Tell me the solutions that work well.<p>I did like you asked. The first search result on google is a question on stack overflow. And the first comment provides an example that looks very much like flexible divs, side by side, between two and four based on the width of the container.<p><a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;60615826&#x2F;two-divs-side-by-side-with-flex" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;60615826&#x2F;two-divs-side-b...</a><p>What didn&#x27;t you like about the solution in that comment?
      • zelphirkalt9 hours ago
        My rule of thumbs is: Use flexbox unless it truly is a grid or repeating rows + &quot;I wonder if a flexbox can be used ... ah yes it can.&quot; Flexbox is just made for responsive layouts. It is very good.
      • xboxnolifes9 hours ago
        flexible divs side by side is trivial with both flexbox and grids. Far, far, far easier than prior to flexbox.
      • 65109 hours ago
        don&#x27;t search, ask an llm. Ask it to keep it as simple as possible and have it explain the tags you&#x27;ve forgotten.
      • decksmith8 hours ago
        [flagged]
    • troupo5 hours ago
      &gt; it&#x27;s honestly hard to explain to people who only write within frameworks how good it&#x27;s gotten.<p>What exactly has gotten good?<p>CSS is the only area that is seeing improvement, and frameworks ... use the same CSS, so no idea what you&#x27;re talking about.<p>Most everything outside of CSS has been and continues to be shit.<p><i>Edit</i>: Moreover, literally all frameworks as one say: give us good browser APIs so that we <i>don&#x27;t</i> have to do any of the things we do.
    • Tadpole918110 hours ago
      I feel like I&#x27;m taking crazy pills.<p>Y&#x27;all know React and Vue frameworks still use HTML, CSS, and JS, right? We&#x27;re using the same thing, with a thin layer of helpers around mounting components and managing their lifetimes...
      • Quothling10 hours ago
        As culi also touches on I think it depends on what is meant by frameworks. As someone who belives abstraction are horrible practice unless they serve a really good purpose though, I never bought the &quot;this is easier&quot; part of the big CSS frameworks. I fully accept that people who work on user facing web applications more than I do, which is rarely, had a much easier time using something like bootstrap&#x2F;tailwind&#x2F;whatever. I always found having to look up documentation on something wich was infinitely worse than the CSS documentation on developer.mozilla.org to be a a weird experience. I do fully accept that a lot of teams experiences would prove my personal opinions wrong on this.<p>On the flip-side I always found javascript frameworks to have a purpose. Though to be fair I don&#x27;t think I&#x27;ve worked with user facing javascript without a framework since jquery came about. I guess you could call that a library, but still.
      • culi10 hours ago
        People who use css-as-an-object type of frameworks or tailwind don&#x27;t really get to experience what writing CSS is like. styled-components or Linaria or Emotion do though ofc
        • yard20105 hours ago
          I love emotion.sh with my heart. It used to be so hard to write css for me until I landed on the mental model of styled components
      • chamomeal5 hours ago
        I don’t disagree with you and I lurve frameworks. Yes, I love react. It is so awesome.<p>But it is SO nice to not have any build step. All of my new projects start as a single babashka script now. You got html templating, throw in a stylesheet. Slap a datastar script tag in there for everything else. It’s just easy peasy.
      • SlackingOff1238 hours ago
        OP might be referring to using React together with a UI library that comes with elements like &lt;Grid&gt;, instead of using just React + CSS grid.
      • rimliu9 hours ago
        Think layer? Like a page loading 6MB of crap to show 0.5KB of text?
      • alerighi6 hours ago
        Except that with React you usually use something like tailwind or similar that abstracts writing CSS, that do me doesn&#x27;t make sense.<p>Of course you can still write plain CSS.
  • fodkodrasz9 hours ago
    Wow even more fancy border styles! Infinite complexity for useless eyecandy. Date pickers are still barely working, last time i needed to build a touch optimized interface (gloves, industrial setting) with date picker, time picker, and numeric up&#x2F;down style input fields it needed custom components and js...<p>But who needs these, when we can have bezel and whatnot...<p>Who needs ways to reliably trigger the display of the touch platform-native keyboard, to be notified if it is displayed and to move the input field in view so it is not obscured by the keyboard?<p>This is why the web is a terrible platform compared to Windows Forms for getting stuff done. Because those making the standards only work on creating gimmicks.
    • afavour2 hours ago
      The stuff in this article is created by the CSS Working Group. The stuff you want would not be handled by them.<p>&gt; Who needs ways to reliably trigger the display of the touch platform-native keyboard, to be notified if it is displayed and to move the input field in view so it is not obscured by the keyboard?<p>Sounds like you need window.visualViewport: <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;API&#x2F;VisualViewport" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;API&#x2F;VisualViewp...</a><p>&gt; The mobile web contains two viewports, the layout viewport and the visual viewport. The layout viewport covers all the elements on a page and the visual viewport is what is actually visible on the screen. When the user pinch-zooms into the page, the visual viewport shrinks but the layout viewport is unchanged. User-interface features like the on-screen keyboard (OSK) can shrink the visual viewport without affecting the layout viewport.
    • lopis2 hours ago
      CSS isn&#x27;t useless eyecandy. Everything we currently do in javascript that can be offloaded to CSS is a performance gain. Sadly datepickers are out of scope for CSS. Expecting this group to solve datepickers is the same as expecting them to work on solving world hunger (and almost as difficult :)
      • stasomatic28 minutes ago
        But it&#x27;s just too complex, more and more stuff. What is this even (from another comment):<p><i>&lt;div class=&quot;container&quot;&gt;&lt;&#x2F;div&gt; .container { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; gap: 0px 0px; grid-auto-flow: row; grid-template-areas: &quot;. . .&quot; &quot;. . .&quot; &quot;. . .&quot;; }</i><p>I&#x27;ve been away from CSS for a few years and this looks alien to me. I don&#x27;t know any of this syntax except for the div declaration, and I used to think I was good at CSS with less and sass. I don&#x27;t want to deal with molecules, or atoms, this is just too much.
      • runarberg1 hour ago
        Off topic: But contrary to popular belief world hunger is technically solved (as in solved on a technical level). We do produce enough food so nobody needs to be hungry, and we know how to distribute that food to anyone who needs it (outside of a handful of warzones, but even there the right organizations have a good plan that will probably work if given the funding and the political backing).<p>World hunger is now fully a <i>political problem</i> and needs to be solved politically. It may sound hard, but in this case it is only a matter of money. The right organizations just need more funding, again that might sound hard, how do you pick the right one, but in this case the right organization is almost always the UN World Food Programme. They need exactly $13B to solve world hunger. And that is not a lot of money.
        • lopis1 hour ago
          You&#x27;re right. Our CSS committee will get right to it :)
          • runarberg37 minutes ago
            Perhaps WHATWG just needs more money and then they will solve the date-picker.<p>Jokes aside, I never has had any major problem with `&lt;input type=&quot;date&quot;&gt;`. Yes there are some annoyances when translating between local time and an absolute timezone aware timestamp. Yes it is annoying that `.valueAsDate()` doesn’t work out of the box. But those are very easy to overcome with a three line utility function.
      • fodkodrasz1 hour ago
        &gt; CSS isn&#x27;t useless eyecandy.<p>Did I claim CSS being useless eyecandy? Nope. Bezels and squircles? Yes.
    • btown7 hours ago
      One small glimmer of hope is that customizable selects are indeed being worked on: see <a href="https:&#x2F;&#x2F;open-ui.org&#x2F;components&#x2F;customizable-select.explainer&#x2F;" rel="nofollow">https:&#x2F;&#x2F;open-ui.org&#x2F;components&#x2F;customizable-select.explainer...</a> and the broader work of the Open UI group at W3C.<p>I&#x27;d love to see this level of customization come to date and datetime-local popups, finding a meaningful path that preserves compatibility with the design languages of various platforms. If and when that happens, it will be because of the work of standardization working groups like Open UI and Interop.
    • hollowturtle7 hours ago
      &gt; Because those making the standards only work on creating gimmicks.<p>Totally agree, but afaik we are a very small minority. My tinfoil hat theory is that all of this is intentional to keep monopolies and making it impossible to compete in the browser space
      • garbagecreator2 hours ago
        Making a community maintained strict subset of the WWW is the way to go if you don&#x27;t want to always rely on the monopolies. The W3C people had a good vision for the web that was compatible with the <i>soul</i> of the web as Tim Berners-Lee intended, but also different to what those that then went and made WHAT<i>they were thinking</i>WG that wanted to embrace, extend, and extinguish the WWW into their dystopia of the web of application and forcing the poor html and css into this amalgamation instead of building on a more compatible base to their ideas. But corpos only look at the possible profit and not the general consequences, they&#x27;re like parasites.<p>Web of applications is a novel idea if executed well, but imo just download the executable and use the package manager to update it, and we still have the internet for communication, there&#x27;s no need for a pseudo OS on top of the OS, if you want sandboxing and a VM do what they did with Java. The modern Web is unnecessary, everything that needs JS or frameworks is because of the retardation in the initial primitive design of the WWW and html, everything could have been implemented in a new xml markup akin to htmx, they were steering to that with their ideas in XHTML2 but never finished because of oppositions from Google et al. Other things like implementing an office suit or playing games in the browser is incompatible with the WWW, and like I said you better go and make a better platform for that.<p>Today it&#x27;s simple to write your own OS than make a web browser, which contradicts everything about the web being decentralized and a protocol, what&#x27;s the difference then if we would send propriety bytecode to this VM called the modern web instead of html et al? Sure you can still use and support a subset, and because of that I mentioned this idea as the first sentence, but this is the trick of EEE; the majority would bite the propriety extended conveniences and make it the new standard, then they would constantly extended until it becomes a game of resources which they have the higher hand in.<p>Some would say it&#x27;s opensource and anyone can implement it, that&#x27;s half the truth when it&#x27;s so complex and grand that only *big* corporations can handle it, and that the WHATWG confessed that the real standard became the source code of the big 3: chromium, webkit, and gecko.<p>Those that believe this is some kind of &quot;tinfoil hat bs&quot; and there&#x27;s no conspiracy are worse than those that believe everything is a conspiracy; because at least the latter would be right once, while the former are never right. I didn&#x27;t mention also how the new web makes it easier for their spyware, but that&#x27;s obvious. The web was about decentralization and standardization, but they skillfully made it the literal opposite.
      • jorisw7 hours ago
        A completely non-sensical non-sequitur. What are you even trying to say?<p>What does one (CSS tech) even have to do with the other (competition in the &#x27;browser space&#x27;)?
        • tomaskafka7 hours ago
          <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=50177605">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=50177605</a><p>And I believe the OP is right. Keep people busy working with changes that don’t move the needle, each of the three large platforms wants to lock in the serious use cases into their native apps.
        • oblio6 hours ago
          This is a known consequence of standards bodies: they get infested by vested corporate interests who generally, in the best case scenario, want the standard to include their entire pre existing implementation. In the worst one they just filibuster and veto proposals until they can&#x27;t any more and they have to do what everyone else wants&#x2F;is doing.<p>This is a phenomenon that dates back to IBM doing this in the 60s-70s-80s.
        • nkrisc6 hours ago
          If web was as good as iOS native, for example, Apple wouldn’t get their cut.
          • jorisw6 hours ago
            What does that mean as related to &#x27;competition in the browser space&#x27; ?
            • KPGv25 hours ago
              Apple has a browser. Apple sits on the CSS steering committee.<p>The assertion is that the major browser owners (Apple, Microsoft, Google, Mozilla) don&#x27;t want competition, so they keep CSS complicated.<p>All four of these companies are members of the CSS Working Group. So the ability to do this is within their power.
              • nozzlegear47 minutes ago
                And how does Mozilla benefit from keeping it complicated? Or Microsoft, for that matter? Neither of them have a mobile App Store, so are they just playing along for the hell of it?
              • jorisw4 hours ago
                IMHO, a sad and small minded conspiracy theory
                • ragall38 minutes ago
                  Also very likely true.
    • silvestrov6 hours ago
      date pickers are something that quickly gets overly complex and site specific.<p>They are only simple when you have no restrictions on which dates that can be selected.<p>But a date picker for a hotel, airplane travel, restaurant, ... might have to show some days as disabled or some days that are &quot;cheap offer&quot; dates.<p>To this add anything that needs to select an interval, like an airplane return ticket.
      • xnorswap6 hours ago
        And then there&#x27;s the nightmare of any interval that runs over daylight savings boundaries, and what that really means if you want not just a date-picker but date&#x2F;time picker.
      • Narretz5 hours ago
        that&#x27;s true. But even for some of the easiest cases some browsers don&#x27;t support them. input[type=month] for example still has no custom UI in Firefox or Safari. And Chrome has had one for 14 years!
      • troupo5 hours ago
        &gt; date pickers are something that quickly gets overly complex and site specific.<p>I&#x27;d settle for a browser specific picker that works in 80-90% of use cases. Instead it took browser several <i>years</i> after introudcing type=date to make a datepicker that is actually usable, and not a throwaway tiny design cooked up by an underpaid intern
    • jorisw7 hours ago
      &gt; Windows Forms<p>Rage bait, don&#x27;t engage
    • user439285 hours ago
      It&#x27;s probably easier to standardize small CSS utils than it is for a date picker.<p>What would the API even look like?<p>One could want to select a single date, multiple dates, a date range, multiple date ranges.<p>Perhaps some dates should be disabled, but should they just be greyed out or should there be a message when the user tries to select them, and if so, how can it be provided?<p>Then there are questions about different calendars and locales.<p>Perhaps third-party date picker libraries are more appropriate here than trying to address this in standards.
    • micromacrofoot2 hours ago
      Date pickers are on the OS vendors to implement properly, at least learn who to direct your ire toward.
    • 4b11b48 hours ago
      Ignorance and generally a hater position
      • fodkodrasz8 hours ago
        Yes, web people don&#x27;t know about the outside word, and generally hate it, and its usecases.
  • CharlesW12 hours ago
    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.
    • culi10 hours ago
      We&#x27;re pretty far past the 5-10 year timeframe now that browsers push updates so aggressively. It&#x27;s pretty common to see features that were adopted just a year ago in common use
    • cubefox9 hours ago
      I started to love CSS even more after I had the fatal ambition to style a table in LaTeX.
      • boltzmann643 hours ago
        Try tabularray.
      • tosti9 hours ago
        Yup and I hate CSS when I want a page to print properly.
        • cubefox9 hours ago
          There is a &quot;W3C Editor&#x27;s Draft&quot; (no idea what that means) on CSS for paged media: <a href="https:&#x2F;&#x2F;drafts.csswg.org&#x2F;css-page&#x2F;" rel="nofollow">https:&#x2F;&#x2F;drafts.csswg.org&#x2F;css-page&#x2F;</a>
  • seanwilson3 hours ago
    I&#x27;m still waiting for decent tooltips that are browser native. You can sort of minimally do them with the `title` attribute but they take ages to appear, can&#x27;t contain HTML or styling (like bold text or images), and you can&#x27;t choose their position. To do them properly with accessibility in mind (keyboard&#x2F;mouse&#x2F;touch support, screen reader support, keyboard focus, it&#x27;s hard!), you need way too much markup with tricky custom JavaScript, and they&#x27;re difficult to get right like making sure they don&#x27;t render partially off-screen.<p>The new CSS anchor positioning and popover attribute help but something simple and built-in that doesn&#x27;t require lots of wiring would be great. It&#x27;s puzzling why we don&#x27;t have this basic UI feature yet?
    • nozzlegear39 minutes ago
      &gt; The new CSS anchor positioning and popover attribute help but something simple and built-in that doesn&#x27;t require lots of wiring would be great. It&#x27;s puzzling why we don&#x27;t have this basic UI feature yet?<p>What&#x27;s the problem with popovers and anchor positioning? They&#x27;re practically made for tooltips, I use them in production for this purpose right now.
    • troupo3 hours ago
      At one point the native tooltips should appear, on top of popovers: <a href="https:&#x2F;&#x2F;open-ui.org&#x2F;components&#x2F;popover-hint.research.explainer&#x2F;" rel="nofollow">https:&#x2F;&#x2F;open-ui.org&#x2F;components&#x2F;popover-hint.research.explain...</a>
  • thisislife27 hours ago
    <i>&quot;Functions in CSS&quot;</i> - Bah! That&#x27;s all we need to make CSS even more convoluted - make it compete with Javascript now ... All these feature creep is just to make sure nobody else can create another browser engine.
    • longor19965 hours ago
      They&#x27;re less functions and more akin to templates or hygienic macros, iiuc from the specs&#x2F;docs
      • afavour2 hours ago
        Part of me feels like naming them functions was a mistake. The other part things screw it, the haters are going to complain no matter what you do.
    • roblh1 hour ago
      Things incoming when this goes live<p>- “I made doom run with only css functions!”<p>- “CSS function vulnerability exposes api keys in NextJs server side rendering”<p>- “css function used for fingerprinting violates EU laws”<p>- “Facebook&#x2F;Meta caught tracking users using CSS function exploit”<p>I’m being facetious, mostly.
    • bradley136 hours ago
      This. Currently, if you don&#x27;t want web pages &quot;computing&quot;, but you still want basic content, you can turn off JS. Add explicit functions to VSS makes this impossible.
      • crocone6 hours ago
        How niche would a website have to be to target the less than 1% of users who have disabled JS?
        • zahlman20 minutes ago
          Almost every blog posted here qualifies, for example. For that matter, Substack still works fine that way, as long as you can deal with (one way or another) a white-on-red stripe banner at the bottom of a black-on-white page.
        • thisislife23 hours ago
          OP is saying disabling javascript may no longer work as desired if CSS is enhanced with JS features ...
          • afavour2 hours ago
            But it isn’t? The functions discussed in the article are not connected to JS at all.
    • crocone6 hours ago
      [dead]
  • afavour12 hours ago
    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.
    • paczki11 hours ago
      Working with modern CSS is such a joy, and increasingly as time goes on I&#x27;m replacing huge chunks of JS with CSS which is a little boon in itself. Honestly, my only complaint is how long I have to actually wait to use new features.<p>Nesting and @layers make maintaining CSS drastically easier than it once was as well.
      • ximm1 hour ago
        How is that? I also like CSS, but when I looked at the @layers spec I didn&#x27;t see any immediate use case.
        • dlisboa18 minutes ago
          Layers is for organization.<p>You can always have different files for different things but without @layers you&#x27;ll bump into specificity issues. You&#x27;d also have to arrange your imports correctly or you spend countless hours on &quot;why is this style being applied and not that one?&quot;.<p>It&#x27;s what makes modular CSS (with cascade) actually possible.
      • zelphirkalt9 hours ago
        I agree. And I don&#x27;t even use layers yet. I keep specificity roughly in mind and narrow my selectors using nesting properly to only affect what I want the rules to style. Do I make mistakes? Sure, but they are easy to fix. Make selectors specific enough and think about whether the rule you are writing is something general or just something for this one component on the page, and it is eeeeasy to not make a mess these days.
    • nine_k11 hours ago
      Also, grids and flexbox solve so many previously tricky layout problems. Animations obviate a bunch of small JS.<p>I sometimes wish that CSS were reduced to the &quot;good parts&quot; and made simpler through it, but I realize that it&#x27;s infeasible.
      • jamesfinlayson11 hours ago
        Yeah with flexbox and fit-content&#x2F;max-content is pretty fine now.
    • spragl7 hours ago
      I warmed up to CSS this year. Before that it was this cryptic thing with seemingly infinite change-try cycles. What happened was that I discovered some of the new features, and was able to greatly simplify and beautify my CSS. I might end up liking it.<p>It has this maddening amount of features though, and as it needs to be backwards compatible, this amount can only grow going forward. But if you look at a well chosen subset of the whole thing, it actually is a quite nice language.
    • tvbusy10 hours ago
      I love working with CSS as well. It feels like the most optimized approach to me. However, it&#x27;s really hard to use CSS as much once the project involves other engineers who don&#x27;t have that level of interest in CSS.
    • techpression12 hours ago
      light-dark() is even better for that :) I also enjoy CSS, using @scope and @layer a lot with the :has() selector, it’s just so different now and I think most people are unaware.
  • alberth12 hours ago
    Maybe I’m alone, but all of those suggestions seem to make CSS needlessly complex (or more like JS).<p>Especially functions.<p>Makes me think of a previous post from the author, who wrote 100k lines-of-code to power their blog.<p><a href="https:&#x2F;&#x2F;www.joshwcomeau.com&#x2F;blog&#x2F;how-i-built-my-blog-v2&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.joshwcomeau.com&#x2F;blog&#x2F;how-i-built-my-blog-v2&#x2F;</a>
    • OuterVale11 hours ago
      Worth keeping in mind that Josh&#x27;s blog is absolutely over-engineered and I&#x27;m sure he&#x27;d admit that himself. He tried to keep parity with his rather complex course systems and his blog itself is a lot more than &#x27;text on a page&#x27;.
    • bgarbiak5 hours ago
      Functions might sound scary, but in reality they&#x27;re used already in CSS processors like SASS&#x2F;SCSS - and then they actually reduce complexity of the code.<p>The example with linear-gradient is probably the best use case for them.
    • beej7111 hours ago
      At last I can realize my dream of writing a JS interpreter in CSS! ;)
      • paczki11 hours ago
        offtopic here but what the heck, I am learning C from you right now! You finally made pointers click for me after failing to learn them a handful of times in the past. Legend!
    • gred12 hours ago
      Yeah it looks to me like we&#x27;re scraping the bottom of the barrel, if this is what&#x27;s left.
    • troupo5 hours ago
      For some reason CSS wants to have all the useful things from SASS without actually making them useful like SASS.
    • mattkenefick9 hours ago
      i dont think functions belong there at all. i&#x27;d actually be pretty disappointed if they added them.
      • slow_typist7 hours ago
        I do not think functions in CSS are the original sin. Why we don’t have them, was a valid question in the 90ies already.<p>And you cannot emulate functions by using a preprocessor in all use cases.<p>But what bothers me is the governance model of CSS, the increasing complexity that leads ultimately to more framework usage, not to thoughtful engineering of accessible front ends.<p>Very soon CSS will be Turing complete and we can have a JavaScript-free C64 emulator. Yay.<p>We need basically control structures and full access to user input to achieve that.<p>And we can only hope the vendors get the sandboxing right this time, otherwise we will get a entire new class of CSS based browser exploits.
    • SadErn12 hours ago
      [dead]
  • Rapzid24 minutes ago
    Baseline 2031 let&#x27;s goooooo!<p>Seriously though. Safari will take 2 years to implement and the releases to work their way out in MacOS&#x2F;iOS updates.<p>Some internal Mozilla employee that disagrees with a spec will let that be known by slow rolling implementation for 4 years.
  • watersb11 hours ago
    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.<p><a href="https:&#x2F;&#x2F;youtu.be&#x2F;0j-Wakm5B84?is=7dU_EvFyk_nQNwjO" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;0j-Wakm5B84?is=7dU_EvFyk_nQNwjO</a><p>It&#x27;s like a peek into a CSS future from a different timeline. Something we could have had.
  • 4b11b49 hours ago
    Good to see Josh writing, especially after his courses have taken such a hit. He is excellent. As an electrical engineer and also now CS grad and someone who has purchased his courses wanting to be able to work across the entire stack.. yet have also thought &quot;thank god I don&#x27;t really have to learn css&quot; now (yes, due to increasing model performance).<p>On that note I may know just enough to be dangerous thanks to Josh (casting spells: e.g. shouldn&#x27;t we group those in their own container and then within that container shouldn&#x27;t that be a flex box?). I guess I&#x27;m here to say humans are full of contradictions.
  • christophilus3 hours ago
    For people who only read the titles &#x2F; comments, I was expecting another silly rant about how AI is disrupting CSS or something, but this was an excellent, concise overview of new and upcoming CSS features. Very well done.
  • unsupp0rted10 hours ago
    &gt; If you’re familiar with JavaScript, this should feel pretty familiar. We define new functions with @function and specify the returned value with result.<p>It used to be that HTML was for content, CSS was for layout, and JS was for &quot;code&quot;<p>Now JS is for content and layout and code, HTML is for content and layout, and CSS if for layout and code
    • bazoom427 hours ago
      CSS is for styling and layout, but there is no conceptual reason this couldn’t be defined through functions.<p>“Code” is not a concern like semantic vs style.
    • vazark7 hours ago
      JS was for &quot;interactivity&quot;. CSS function is just a simple abstraction for user reusable logic.
    • kaelwd9 hours ago
      <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;Reference&#x2F;Properties&#x2F;content" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;Reference&#x2F;P...</a>
      • unsupp0rted9 hours ago
        To be fair, the `content` property rarely gets used for anything more than a label or icon, or perhaps a tooltip
    • matsemann8 hours ago
      I think your definition is off. Js was never for &quot;code&quot;. The code itself is just a means to a goal. That certain things better can be achieved without js is good.
      • unsupp0rted8 hours ago
        Microwave ovens were never for heating food. The warming is just a means to a dinner.
        • NekkoDroid7 hours ago
          Better analogy would be &quot;Microwave ovens were never for injecting electromagnetic waves into food. The electromagnetic waves were just a means to heat the food&quot;.
    • gtsop8 hours ago
      [dead]
  • masfuerte3 hours ago
    I was going to complain that the W3C CSS validator is hopelessly out of date, and still doesn&#x27;t handle CSS nesting for example. But there&#x27;s been loads of activity in the last few weeks, including a fix for nesting.<p>Thank you &quot;sideshowbarker&quot;, whoever you are.
  • herpdyderp12 hours ago
    A bit strange to me how Josh beings with heralding the browsers working together and then every mentioned feature is Chrome only. They&#x27;re nice previews for a potential future I suppose!
    • paulhebert11 hours ago
      The article is specifically about the “inter-op” program where the browsers work together on specific standards to bring to all browsers. (And we get to vote on the selection!)
    • troupo5 hours ago
      It&#x27;s because Chrome has taken over interop. Just like they do with any other useful initiative like OpenUI [1].<p>It feels like Interop was created to curb Chrome&#x27;s bulldozing various processes with their own internal APIs and development, and to show that there&#x27;s more to the web than yet another shitty Javascript API. So a lot of Interop is decidedly everything <i>else</i>. See e.g. Interop 2022: <a href="https:&#x2F;&#x2F;hacks.mozilla.org&#x2F;2022&#x2F;03&#x2F;interop-2022&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hacks.mozilla.org&#x2F;2022&#x2F;03&#x2F;interop-2022&#x2F;</a><p>Of course Chrome bulldozed this effort as well<p>[1] <a href="https:&#x2F;&#x2F;open-ui.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;open-ui.org&#x2F;</a> Started by Microsoft, of all people. Now almost completely taken over by Chrome of course.
  • koolala12 hours ago
    The new responsively-sized iframes standard is an exciting one for me not mentioned. It&#x27;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.
  • markasoftware8 hours ago
    I know this post isn&#x27;t about vibecoding frontends, BUT...<p>Many of my coworkers and friends are rejoicing that they don&#x27;t have to write frontends anymore. I actually think that frontends are the last thing that should be vibecoded. It&#x27;s the part that faces the user. It&#x27;s what helps the user form their first impression of your product. If your landing page looks like it was made in 30 seconds by Claude, they&#x27;ll assume the rest of your product was too. Use AI assistance on the parts of your codebase where only raw functionality matters (eg, the backend), and put real human effort and care into the frontend that reflects the effort put into the rest of the system.
    • davedx8 hours ago
      Shocking take: you shouldn&#x27;t really <i>vibecode</i> any part of a serious application!<p>Definitely use coding agents to write code, but carefully and thoughtfully review any important backend or heavily user-facing components of the software you&#x27;re developing.
    • mobelkh8 hours ago
      everyone is rejoicing the other part of the stack can be vibecoded.<p>a backend developer would tell you the backend is much more important to focus on, performance, security, data integrity etc. not losing or exposing customer data is a lot more important than what it looks like.<p>truth is, it&#x27;s all still important, preferably no one is vibe coding any part of a serious product.
      • markasoftware8 hours ago
        Fwiw I am a &quot;backend&quot; developer and have never in my professional career written a frontend except for internal tooling.
    • dwayne_dibley6 hours ago
      &gt;if your landing page looks like it was made in 30 seconds by Claude ....<p>This is very true, I &#x27;walked&#x27; away from a material coating website just yesterday because it looked too Claude.
    • frou_dh8 hours ago
      &gt; It&#x27;s the part that faces the user. It&#x27;s what helps the user form their first impression of your product.<p>Same for the README on a GitHub project. Alas, plenty of those are now just voluminous AI spew.
    • mmo938 hours ago
      Haha, until you figure out the entire frontend is one large dump of esoteric jQuery, with 15 years of accumulated terrible decisions
      • 65108 hours ago
        I gave your resume to the B-9 HR bot and it said you should be escorted off the premises. <i>&quot;DANGER DANGER!&quot;</i>
    • jpnc7 hours ago
      Here&#x27;s another prediction in the ocean of them we&#x27;re swimming in right now: websites won&#x27;t matter. When you have a general interface that can present data however you wish, being restricted by the whims of designers will seem prehistoric.
    • sourcecodeplz8 hours ago
      you can&amp;should use AI to help you with frontend (css,js).<p>doesnt mean you tell it: make it look nice.<p>i find it is great if you want to apply your creativity and ideas.<p>how to add borders, gradients, animations, positioning, etc.<p>its a great time for everyone to build things, just how they want&#x2F;imagine them.
    • melin20248 hours ago
      Truth be told, marketing is the only truly non-fungible function we have.
  • flossly1 hour ago
    I&#x27;m more insterested in the new CSS scoping feature that still not supported. HAving CSS only work on a scope of the DOM would make dealing with CSS a lot easier.<p>While waiting for that I decided to use Tailwind so I can basically &quot;not do CSS&quot;, but have it locally defined in my HTML. It buys me a similar freedom to the CSS scoping feature, as the cost of having to run a bunch of tools to get my final CSS asset file for deployment.
  • PennRobotics5 hours ago
    Corners and borders have been a pain since the beginning of GeoCities. I do wish fancy corners would go away---to the point that I actively make this happen with a global Stylus rule setting border-radius to 0.<p>Look: Three of these 10 &quot;improvements&quot; deal with corner shaping, and two more will inevitably need extending, as I imagine frontend devs get around to, &quot;GPT make reading-flow responsively round only the outside corners,&quot; and, &quot;Claude how to squircle the individual grid cell borders when using rule gap decorations.&quot;<p>I understand CSS wants to do all of the things and do them well, but then the eye candy gets overused on every webpage and web framework template to the point that practically no site feels different; it&#x27;s all &quot;logo, four links, giant-ass &#x27;call to action&#x27; rounded button in the bold colored top nav, rounded corner cards in a grid layout 3 to 4 cells wide (or in a slider), gratuitous whitespace, rounded corner everything actually, maybe a gradient text or background or both, hamburger menu on mobile, all styles inlined in the HTML classes&quot;.<p>Going down the list of Fortune companies, three of the top 50 don&#x27;t &quot;round corner&quot; everything: Berkshire, Exxon, Morgan Stanley. A few more would count if you permit rounded buttons only. Marathon is a weird outlier; they have hexagonally rounded elements buttons. (Also, some of these sites must be hosted on a Zune. It takes 50 full seconds to load Cencora&#x27;s main page.)<p>I can&#x27;t say that I do web dev any better, although I <i>am</i> disappointed by the looks of the modern internet, and I don&#x27;t think more artistic flair will make it better, just as I don&#x27;t think houses and cars and suits benefit from strange shapes and colors.<p>although maybe more choice will free us from the confines of everything looking like Tailwind? (Despite my complaints, I <i>am</i> grateful for progress and also am absolutely not looking forward to people misusing functions and dropping 18 errors and 11 warnings into console.log AHEM LENOVO because they can&#x27;t be troubled to write good code&#x2F;markup.)
    • 72deluxe5 hours ago
      That&#x27;s a spot-on summary of all websites I see. It seems particularly annoying given that most landing pages seem to be identical LLM-output pages that require a lot of scrolling before you get to any &quot;information&quot; on the page.
  • NoDodgeQuestion2 hours ago
    1. &quot;cascade&quot; is mistake and &quot;separation of concern&quot; is mistake <a href="https:&#x2F;&#x2F;adamwathan.me&#x2F;css-utility-classes-and-separation-of-concerns&#x2F;" rel="nofollow">https:&#x2F;&#x2F;adamwathan.me&#x2F;css-utility-classes-and-separation-of-...</a><p>2. website work perfectly fine without CSS functions, Bevels and squircles, Infinite possibilities with border-shape, ... only need these for make CSS educational blog<p>3. future of CSS is DeepSeek
    • lopis2 hours ago
      You&#x27;re wrong. I can&#x27;t wait for these to land in CSS.
  • lioeters12 hours ago
    Do we really want functions in CSS? I guess that ship has sailed a while ago, since CSS reached Turing completeness.<p><pre><code> &#x2F;* Define a function: *&#x2F; @function --gradient-to-transparent(--color, --direction: bottom) { result: linear-gradient( to var(--direction), var(--color), transparent; ); } </code></pre> Why not provide better integration with JavaScript, to make this kind of acrobatics unnecessary.
    • afavour12 hours ago
      Because JavaScript requires… a lot. A virtual machine, script parsing, etc. Making that a requirement before you even display any content on the page would be a regression.
      • dlcarrier12 hours ago
        If CSS is Turing complete, that means it has a virtual machine with parsing and so forth. That means that difference between it and JavaScript is just syntax. (Same for any Turing complete language)
        • afavour3 hours ago
          Not <i>just</i>. There’s also the issue of complexity. And JS is considerably more complex. Just think of all the APIs that are immediately available at runtime in JS, for one. It takes up far more memory and CPU cycles to initialize, the language itself is much more complex…
        • gf0003 hours ago
          CS theory-wise, yes. Practically, no.
        • tosti9 hours ago
          Well, kinda... <a href="https:&#x2F;&#x2F;cssdoom.wtf&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cssdoom.wtf&#x2F;</a>
      • lioeters12 hours ago
        I can see that, but CSS already requires a lot, no? Especially as they keep adding new features to it.<p>To me it feels like &quot;programming in YAML&quot;, the way a declarative language&#x2F;format acquires more and more features until you&#x27;re writing functions in an awkward syntax that was never designed for it.
        • afavour12 hours ago
          It requires a lot… but a lot less than JS. The awkward declarative nature of it is a side effect of wanting it to parseable at speed.<p>At an initial look I agree with you that the functions look very awkward. But I thought the same about CSS variables until I started using them and now I think they’re great so I’ll keep an open mind. I almost wonder if they would have been better off calling them “templates”, or something. “Functions” is going to make people think it’s just like JS.
          • lioeters11 hours ago
            Yeah OK, I see what you mean, I may change my mind once I start using them. And having worked on interpreters and compilers, I can understand the need to keep internals simple and fast - like everything must be parsable in one pass - so the surface ugliness of syntax isn&#x27;t as important in the long term.<p>Perhaps I should also be sympathetic to the spec authors, since they&#x27;re working under tight constraints of language design. Things might look a lot more elegant if HTML&#x2F;CSS&#x2F;JS were designed from scratch as a coherent whole.
            • afavour1 hour ago
              It’s worth noting that the CSS Painting API exists and allows you to use JS functions:<p><a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;API&#x2F;CSS_Painting_API" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;API&#x2F;CSS_Paintin...</a><p>It’s Chrome only though.
          • SadErn11 hours ago
            [dead]
        • agstudio10 hours ago
          Strongly agree. While I am a huge fan of the capabilities of native CSS and the fact that it keeps getting more capable as time passes, I have come to the conclusion that it is unfortunately a programming language trapped in an “obsolete stylesheet syntax” body, especially after the addition of calc(), variables, functions and multiple ways of conditional logic.<p>The worse part of working with CSS is that there is no standard static type checking tool (stylelint comes close though). A lot of programming errors should&#x2F;could be caught at build time.<p>Sometimes wondering if a completely alternative syntax+tooling is possible that would leverage all the existing capabilities, while using a different language paradigm.
          • chuckadams10 hours ago
            The ironic thing is that the old-school ancestor to CSS already was a programming language: DSSSL was a dialect of scheme.
            • lioeters9 hours ago
              That DSSSL syntax looks a lot better subjectively.<p><pre><code> (element doc (make paragraph font-size: 20pt line-spacing: 20pt font-weight: &#x27;bold color: color-purple (process-children))) </code></pre> In an alternate universe timeline, we could have had a single web language for hypertext, styles, and scripting.
              • chuckadams35 minutes ago
                &gt; In an alternate universe timeline, we could have had a single web language for hypertext, styles, and scripting.<p>That&#x27;s actually something you don&#x27;t necessarily want: <a href="https:&#x2F;&#x2F;www.w3.org&#x2F;2001&#x2F;tag&#x2F;doc&#x2F;leastPower.html" rel="nofollow">https:&#x2F;&#x2F;www.w3.org&#x2F;2001&#x2F;tag&#x2F;doc&#x2F;leastPower.html</a> ... then again, once you hit turing-completeness and people start relying on it, you probably also have to admit that you&#x27;re already soaking in it and you may as well make it pleasant.
              • lenkite3 hours ago
                Wow - looks so good in LISP syntax. They could have probably also introduced compute restrictions (Execution Time Cap) by limiting nesting.
      • geocar10 hours ago
        We had that. It was called XSLT.<p>Google said they weren&#x27;t smart enough to implement it, or pay anyone to fix the one they forked a decade ago.
    • afiori8 hours ago
      Because that CSS can be evaluated with lower latency than the equivalent js
    • 4b11b48 hours ago
      Probably. Trade-offs is engineering
  • thibran10 hours ago
    The future of HTML&#x2F;CSS and hopefully JavaScript is, that it no longer used and replaced by a new technology stack.<p>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.<p>When looked at web tech from a distance, it is cristal clear to me that we need something new.<p>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.
    • zelphirkalt8 hours ago
      &quot;Some scripting for dynamic things&quot; will never satisfy the &quot;everything must be an SPA&quot; crowd, unfortunately.<p>CSS has warts, true, but you are not forced to use them. Modern CSS can be brief and clean.
    • micromacrofoot2 hours ago
      This is a monkey&#x27;s paw situation, because instead of the web people are increasingly getting pushed into native apps. I&#x27;ll take the janky web languages over native apps any day of the week.
  • Naru414 hours ago
    However, I always wonder, does the browser really need to understand this syntax? (I feel `function` is too much for just stylesheet)<p>Ultimately, what we want to represent is a DOM tree. The format doesn&#x27;t matter. So we should send a computer-friendly, pre-compiled data structure that the browser can use directly. memcpy is faster than parse.
    • gf0003 hours ago
      Memcpy of what? I&#x27;m fairly sure Firefox&#x27;s internal representation is different from Chrome&#x27;s, so you just replaced parsing from X with parsing from Y.
  • manlymuppet11 hours ago
    Is there any implementation proposal which exists that makes relative corners automatic?<p>If you want them now, you have to do sort of verbose and clunky calculations to get outer corner radius.<p>[Outer Radius = Inner Radius + Padding](<a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;Design&#x2F;s&#x2F;oal9fZclJS" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;Design&#x2F;s&#x2F;oal9fZclJS</a>)<p>This seems like something standard enough to be a built-in feature.
  • karol3 hours ago
    This looks a bit like another revolution is brewing, where people relying heavily on Tailwind might one day be surprised how powerful the raw CSS has become.
  • lelanthran9 hours ago
    Hah;<p>&gt; The Anchor Positioning API allows us to anchor one element to another.<p>Hello CSS, Welcome to 1996 Delphi :-&#x2F;
  • lopsotronic12 hours ago
    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.<p>Anchor Positioning would be sweet and doesn&#x27;t feel like it&#x27;s got so much baggage.
    • hdjrudni11 hours ago
      <a href="https:&#x2F;&#x2F;caniuse.com&#x2F;css-anchor-positioning" rel="nofollow">https:&#x2F;&#x2F;caniuse.com&#x2F;css-anchor-positioning</a><p>All browsers at least have partial support. I&#x27;ve been using it.
  • stsch6 hours ago
    What a beautiful blog and post. Highly appreciated, especially in the current times. :-)
  • account424 hours ago
    This is just a list of Chrome-only CSS extensions.
    • afavour2 hours ago
      Read the article again and really focus every time the word “interop” appears.
  • weinzierl8 hours ago
    CSS was born out of the idea that content and presentation should be separate with the former controlled by the author and the latter by the consumer.<p>Most of CSS&#x27;s design was informed by that idea. That styling is in separate files in the first place and then all the complicated cascading stuff that is even in the name of the thing.<p>I&#x27;ve always been fond of that idea and still am but there is no denial that it utterly and completely failed and now we live in a world where all these things are just cargo cult. Sometimes I think it&#x27;d be best to finish what Tailwind started and be consequential about it which would mean going back to presential HTML alltogether.
    • dsego5 hours ago
      It failed because it married selectors to the content, so the CSS rules inevitably follow the document structure. You can avoid it by either using utility css, avoiding descendant selectors or using some methodology like BEM and use only classes to style elements. There are two types of separation here, same document that can be styled differently with a different stylesheet (think zen garden), but the other one is reusing the same look&amp;feel across different web pages. These two goals are not always compatible. The other thing to consider is that maybe HTML itself is the presentation layer, data usually lives in a database or different file formats, JSON, CSV, excel spreadsheets. A lot of the aspects of laying out the content is trapped in how you structure the HTML, and no amount of CSS can change how the document is organized.
  • coubri2 hours ago
    in the times before LLM working with CSS manually was kinda fun actually. Sad thing it is too time-consuming nowadays
  • kumarvvr11 hours ago
    I am very much excited for the future of CSS. And I love that functions are a part of it.<p>I spent 3 months this year testing out a reporting system for large quantities of dynamic data.<p>My requirement was to generate pdf reports, but didn&#x27;t want any reporting tools and installations. Especially something like Microsoft Excel, which the old system was based on.<p>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.<p>And it&#x27;s glorious.<p>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.<p>And there is so much more.<p>The format is awesome for ingestion by ai models.
  • astrod10 hours ago
    I forgot about functions!<p>I always thought that everything from Sass was pretty much ported over by now.
  • piro09199 hours ago
    I built a web app with Claude Code without reading the code it wrote. I only asked for things like &quot;add outer margins to the menu and header, with a transparent blurred background,&quot; and it came out the way I imagined.
    • dsego5 hours ago
      Like Rust, CSS is a great language if you never ever have to actually look at it.
    • pipe017 hours ago
      Congrats
    • louiskottmann8 hours ago
      You do realize &quot;Claude&quot; actually wrote CSS for you and thus you need that language to strive ?<p>Such an uninsightful comment.
      • dsego5 hours ago
        Give it a more charitable reading. But I think there is truth to it, CSS was never that great with just describing what you want, it was always more like arcane spells and tricks you learn to achieve a specific goal. Historically just trying to center something or achieve equal spacing would send you down a deep rabbit hole of quirks, browser support, layout modes and so on.
  • boxed9 hours ago
    &gt; It was implemented in Firefox back in 2019, but there wasn’t much movement with other browsers for years<p>Just call it like it was: Chrome. It was Chrome that didn&#x27;t move. We can all see the graph :P
  • jackie106733115 hours ago
    Great Atricle
  • jamienk12 hours ago
    Still can&#x27;t tree shake. It&#x27;s what makes my old css files grow into monsters. I feel like everyone has given up on this.
    • robertwpearce11 hours ago
      For small-scale projects, I use a server-side helper for an HTML page to include only certain CSS, SVG, and JS on a page. Each JS file is tiny, progressive, vanilla JS; SVGs are predefined and generate an SVG sprite that I then consume; CSS pulls in a `base.css`, the page&#x27;s CSS file, and any component ones pull in their own. It&#x27;s hand-rolled per project (pre-AI being decent), but I&#x27;m proud of it, and it keeps every page tiny. HTTP&#x2F;2 multiplexing is pretty good and downloads the files more or less in parallel.
    • afavour12 hours ago
      CSS modules ought to make it possible. But it’s more or less impossible with regular CSS, you have no idea when a class&#x2F;ID might be used.
  • Thanemate8 hours ago
    Thankfully, now that our machine God is here, we don&#x27;t need to bother ourselves with learning new CSS features. Just feed the article to the machine as part of the spec and it will handle everything.
  • efilife7 hours ago
    I hold the opinion that adding anything to CSS is a bad idea. It&#x27;s already complete, you can do almost everything you&#x27;d want in it, and if you can&#x27;t there&#x27;s always javascript. Updating CSS forces people to update their browsers and we get that never-ending chase of compatibility. It&#x27;s just breaking stuff for a little benefit
  • ifh-hn8 hours ago
    At what point is CCS just another programming language? It&#x27;s getting there, no?
  • NooneAtAll37 hours ago
    so funny to start the article with &quot;Interop that all compilers unite to implement together&quot; and then proceed to show features available only in one browser
    • royal_ts7 hours ago
      see here: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=50176056">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=50176056</a>
  • slopinthebag11 hours ago
    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...<p>remove inheritance and cascade from css and then we&#x27;ll talk. but for now ill stick to tailwind.
  • stasaibridge6 hours ago
    cool stuff
  • sneak10 hours ago
    CSS was done a long time ago. Stop changing it.
  • shevy-java10 hours ago
    In general I like CSS, but ...<p>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)<p>b) &quot;CSS Subgrid is a good example. Subgrid is a super-powerful extension to CSS Grid which enables entirely new layouts.&quot;<p>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.<p>Now via a &quot;subgrid&quot;, they acknowledge that the existing ways SUCK. So they add yet-another-component here. This reminds us of:<p><a href="https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;</a><p>I started to go back to oldschool - HTML tables.<p>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.
    • OnlineTux8 hours ago
      Aren’t HTML tables accessibility nightmares?
      • OuterVale8 hours ago
        For data? There are some foot guns but they do intended job well. For page layout? Accessibility nightmare.
  • randfur9 hours ago
    interpolate-size: allow-keywords holy shit, didn&#x27;t know I&#x27;d see the day...
  • taventix9 hours ago
    you need to be a pro to build fancy shit with vanilla css xD
  • adrianhqs6 hours ago
    [flagged]
  • Unified-Mentor2 hours ago
    [dead]
  • derekhong13 hours ago
    [flagged]
  • georgestones11 hours ago
    [dead]
  • jocelyner12 hours ago
    [dead]
  • dolebirchwood11 hours ago
    [flagged]
  • FDEUp12 hours ago
    Say it with me:<p>Broad support for new CSS features is GOOD.<p>Making BASIC SITE FUNCTIONALITY depend upon new CSS features is bad.
  • asdfsa3211 hours ago
    HTML and CSS are like bash, no one would use them if it wasn&#x27;t for the fact that it is everywhere.
    • andsoitis11 hours ago
      Why would you pick something that isn’t ubiquitous? Being everywhere is the probably the most important feature for the vast majority of cases.
      • asdfsa3210 hours ago
        Because ubiquitous has nothing to do with any other quality like correctness, ease of use and ergonomics, good taste, robustness, and so on.