News for hackers. Stuff that matters.
Re:Tailwind Is a Leaky Abstraction by hbn on Tuesday November 29, 2022 @11:02AM (#33789218)
I've never understood the point of separating markup from the design. I've seen CSS Zen Garden and... neat? But I don't get the point in real-world use. I've never had to redesign a UI in a way where I'd only change CSS and not also be moving around markup in the process. And once you're changing both of those things, there's the overhead of cross-referencing and keeping names and hierarchy in sync. At that point I don't know why I'd want the 2 separate.

The most magical moment for me when I started using Tailwind was realizing you can simply cut-and-paste an arbitrary block of HTML from one place to another and have it just render exactly as you'd expect. You don't have to additionally copy-paste a block of CSS, and then fudge around with the selectors because in the previous place it expected to be in some parent container or what have you.

Re:Tailwind Is a Leaky Abstraction by cormacrelf on Tuesday November 29, 2022 @11:15AM (#33789424)
The question of where to put the styles boils down to "do your content and style people work in completely separate teams?" For a newspaper, this is true. For someone who got their mate to set up their blog, this is true. Early days web was mostly like that. Not any more. If it's the same person doing it, put it in the same place. Separation will just be a hindrance.
Re:Tailwind Is a Leaky Abstraction by luxcem on Tuesday November 29, 2022 @01:23PM (#33791185)
It still is mostly like that, the content is not the html, the html is the presentation layer, as much as the css.

The content will be inserted from an API or with a templating system.

Re:Tailwind Is a Leaky Abstraction by greenhatman on Tuesday November 29, 2022 @03:56PM (#33793167)
I want to see the company where the HTML and CSS are handled by separate teams.
Re:Tailwind Is a Leaky Abstraction by bliteben on Tuesday November 29, 2022 @12:42PM (#33790661)
it really only would make sense if we were serving pure xml and the webpage was the api for literally every webpage.

since that is not the case, tail wind is great, even the biggest complaint about tailwind, bloated html size seems like something you can just compile away.

Re:Tailwind Is a Leaky Abstraction by anamexis on Tuesday November 29, 2022 @01:08PM (#33790997)
> it really only would make sense if we were serving pure xml and the webpage was the api for literally every webpage.

This is, of course, XSLT, which was supposed to take over the web at one point.

https://en.wikipedia.org/wiki/XSLT

Re:Tailwind Is a Leaky Abstraction by baby on Tuesday November 29, 2022 @08:59PM (#33795983)
That reminds me the pitch for the first time I discovered css zen garden: "you can redesign your website without changing the HTML!"

I sort of liked it at first. I even added the opportunity for my users to modify the CSS to add new styles, and share these to other members of the community via a configuration page. It was a neat thing but not many people bothered and in the end it made everything more complicated (and I guess I was really scared of vulnerabilities the whole time, what can go wrong with letting your users set the stylesheet.)

Worse, I think this new approach broke the web as it was: an explosion of flash-layout or photoshop--or-fireworks-cut-layout websites. It used to be beautiful. Now the web is just a series of websites styled by CSS. It's sad.

phones (and their screen size + apple killing flash) really killed the beauty of the web IMO. Now everything's an app.

Re:Tailwind Is a Leaky Abstraction by nedt on Wednesday November 30, 2022 @05:35AM (#33799028)
Well you have that CSS zen garden thing nowadays. It's all the different media, screen sizes, user preferences. And instead of writing multiple classes that defines styles for different outputs you just have one and let CSS handle the differences. No need to duplicate classes, just semantic names.