Comment by mind-blight
2 days ago
I appreciate the links. I think this quote from the FAQ captures the disconnect for me:
``` This isn't about rejecting modern development - it's about recognizing that browsers now offer sophisticated capabilities that eliminate the need for most framework abstractions. ```
The problem I have is that I agree with the initial premise, but I disagree with the conclusion. Framework architectures mostly solve different problems than modern web standards.
If you want to go after specifics like 1) just use browser forms and stop re implementing the wheel, 2) you probably don't need a massive state validation library, or 3) stop building CSS features in JS, then I'm 100% on board. But that's not a problem with CSS-in-JS, JSX + render library, components, or many of the other targets you go after.
Things like tailwind (for example) solve fundamentally different problems, and those have more to do with team standardization, avoiding bike shedding, and rapid prototyping. For styling in particular, I don't want to return to the days of crawling through thousands of lines of CSS - edited over years by multiple teams - to find all of the places where different styles impact the specific html component I'm looking at. That's tightly coupled code with loosely defined locations. JSX components just decay less quickly due to encapsulation.
I've also just never seen the separation of CSS and HTML actually provide practical value. It's always been "check out what's possible!" projects like CSS zen garden. Super cool, but that decoupling just doesn't do much in practice.
Like I said, I think there are some interesting ideas here, but I just don't think it's clear why this is a better approach for general web application development (which is the argument you appear to be making).
I'm super curious to see if you prove me wrong, so I'll definitely keep an eye out :). I just don't yet see how the proposed solution solves the identified problems without pulling in a bunch of pain points that were already solved a while ago.
I understand this concern deeply. For developers who've spent years mastering JavaScript patterns and component architectures, the idea of "returning to CSS" can feel like a step backward. They remember the pain points of global styles, specificity wars, and maintaining large CSS codebases.
But this perspective misses how fundamentally different modern CSS development has become. When you embrace CSS as your primary architecture, you're not just writing styles - you're building a design system. You can make typography following certain "musical" scales, colors maintaining precise OKLCH relationships, and spacing flowing from consistent ratios.
It's also about the simplicity in semantic HTML. Consider a real example: a typical React component library might need four different versions of text styling: Text, Description, DialogDescription, and AlertDescription. Each requires its own component definition, TypeScript interfaces, and style declarations. But in a CSS-driven system, this complexity vanishes. A single typographic scale handles all text needs through mathematical relationships.
This systematic approach leads to dramatically less code overall. Where JavaScript monoliths often grow to thousands of lines, a CSS-based system keeps in hundreds.
Nue is of course not for everyone. It's specifically designed for developers who see CSS as a creative medium - who get excited about the possibilities of container queries, custom properties, and calc() functions. For these developers, CSS isn't just a styling language - it's a powerful system for expressing design.
> When you embrace CSS as your primary architecture, you're not just writing styles - you're building a design system.
And
> Nue is of course not for everyone. It's specifically designed for developers who see CSS as a creative medium - who get excited about the possibilities of container queries, custom properties, and calc() functions. For these developers, CSS isn't just a styling language - it's a powerful system for expressing design.
Are both super interesting and make sense with a number of changes I've seen in the ecosystem. I respect CSS-focused developers (I'm not one, but I like to dabble) and appreciate a ton of innovation that's coming out of the designer-developers who try to push the boundaries of both the roles and the technology.
The disconnect that remains for me is that client/server state management and scope creep are the two main drivers of sprawling code bases in my experience. Having a bunch of 1-off styles in a component definitely made design updates a nightmare, but tailwind and/or just using CSS variables helped improve that. Using service-oriented architecture (including on the frontend to keep complex business logic out of components), GraphQL + fragments + urql/apollo, and/or Remix (or a similar framework) were all really big steps forward in trying to solve the thorny state management problem. They all come with their own tradeoffs, but that's where most of the complexity and sprawl comes from in my experience.
There's definite bloat from people re-inventing the wheel (forms are the most common one I encounter), but the explanation pages feel like Nue is a panacea. I only see how it improves specific areas rather than the whole architecture. I'll say, I really like how HTMX approached their education around this. Similarly, they're a "use the standards!" kind of library, but they have clear examples of what is solved, and what isn't solved. And their "isn't" includes cases where the current approach is better suited. That makes the scope a lot clearer, which I still feel like I'm missing from the Nue project
ETA:
It's also possible that I'm just not the target audience. Most of the projects I've built or lead have been either extremely event heavy (E.g. using Bluetooth sensors attached to limbs + timers to guide people step-by-step through exercises) or extremely data heavy (e.g. analytics and information collection based on dynamic ontologies). The data model and state management were always multiple orders of magnitude more complex than almost anything else.
Thank you, @meiraleal! The reception here is pretty brutal but expected, especially around CSS. Engineers consistently dismiss its power, no matter how it's presented. However, for those of us who work with design systems, the value is self-evident.
Tipiirai, thank you very much for patiently replying all these comments. Tailwind is a terrible abstraction, nobody should be shamed for saying that and the people not used to modern CSS or the ones that can't organize code, well, they should be the ones explaining themselves.
> I've also just never seen the separation of CSS and HTML actually provide practical value.
I would pay really good money to have a library of web components that implemented only the document structure using semantic HTML and the Javascript interactivity, and kept all the styling on a separate CSS file. Something like headless-ui, but without any of the utility classes.
Then we could move on from these template marketplaces (where each dev has to reimplement their own widgets for each different javascript framework), and we would have a simpler marketplace of "Web Component Themes".
You should check out Radix UI (https://www.radix-ui.com/). Same idea as headless ui, but it doesn't assume that you will use Tailwind. I _think_ they add css classes to all of their components to allow you to choose any styling method you want, but I'm usually working with ShadCN (which is one level up and uses tailwind).
Though, I'll say that I agree with OP that a lot of functionality already exists within HTML and browsers.
But Radix UI is still based on React. Maybe someone could take a shot at porting them to "pure" Web Components.