4 ms·
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 ne
by hbn 4y ago
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.
- cormacrelf 4y agoThe 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.
- luxcem 4y agoIt 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.
- greenhatman 4y agoI want to see the company where the HTML and CSS are handled by separate teams.
- bliteben 4y agoit 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.
- anamexis 4y ago> 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 https://en.wikipedia.org/wiki/XSLT
- baby 4y agoThat 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.
- nedt 4y agoWell 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.