I'll take this version over tailwind anytime. It's one auto-formatting step from being perfectly readable for someone who knows css and styles tell me how it looks like and css classes tells me WHAT IT IS. And information (nearly?) completely missing from tailwind counterpart. I can also easily see what structure the DOM has.
yeah it just looks like that to everyone else, so you're avoiding the pain yourself while inflicting it upon anyone interested in inspecting the compiled output
I'm not a fan of tailwind, but this isn't what I optimise for when building websites.
Besides, I suspect (but not know, because my experience with tailwind is very minimal) that that output is readable and understandable by those experienced and developing with tailwind. On top of all the other affordances modern dev tools gives to understand styling on elements (esp. the computed pane)
When you build websites you are creating code for others to read as much as you're creating an "app" or document.
It's the very essence of what's good and special about the web. If the companies that are trying to do away with this succeed, we will have lost something important.
The web is and should remain de facto open source.
> When you build websites you are creating code for others to read as much as you're creating an "app" or document.
I couldn't disagree any more with this. When the overwhelming majority of your users would never actually be impacted by this, I believe you have more of a responsibility to the bulk of your users, rather than a fraction of a percentage.
I say this as an open-source developer, who ships source maps to production. I would much rather us increase our development veloticity and build higher quality products rather than satisfy one nerd who might want to occasionally view source.
> When you build websites you are creating code for others to read as much as you're creating an "app" or document.
That's an approach people are certainly welcome to take, and I'm glad that some people do, but I disagree that this is what the act of building a website entails.
This feels a bit like romanticizing the early days of the web, when the primary form of learning involved reading other people's source code. The depth and breadth of ways to learn in 2024 looks nothing like those early days.
If I choose to build something to solve a particular need or to communicate something I care about, it's my choice as to how I do that.
> It's the very essence of what's good and special about the web.
The very essence of what's good and special about the web is the diversity of solutions, the myriad of entry points to becoming a web developer, the existence of tools ranging from vanilla HTML/CSS all the way up to complex frameworks like Tailwind, and your freedom to pick your path.
Tailwind's existence does not threaten the layers underneath it.
Your use case is fairly specific. Tailwind is a tool, if it doesn't make sense to you and your use case, it's okay to not use it. That said, it's not okay to misrepresent what Tailwind actually is like the original commenter did.
I'm so glad this wasn't the prevailing opinion when they first came up with the web. "Inspect source" is how I learned how to build my first website in the newly released browser called "Firefox 1.0".
I learned how to build websites in the late 90's similarly. Then progressed by reading blogs of other developers who shared their source in their posts.
It made sense back then because it was all we had to learn. Today there's tons of code to learn from both in open source and resources.
Lets get rid of this false dichotomy that the only way to learn is by viewing the source of websites, in the year 2024.
It's because of the mentality that things should be open and inspectable that we have things like browser devtools (thanks Firebug!), that is something we still use today to learn and troubleshoot. Sometimes it makes it harder when people use various compile-to-js/css languages, but also sometimes people ship their sourcemaps and again we can learn from examples. Or we try to reverse-engineer it, which is another valuable skill.
I didn't mean to say this is the only way of learning, but I stand firm on that it's still a great way to learn, to look at how cool stuff was done when you come across it on real websites, not just from blog posts describing something. In addition to reading fundamentals, practicing small projects and so on, of course.
It wasn’t an opinion, but I think you gave me the answer anyway, which seems to be “students learning CSS”. I never learned CSS like this, so I wouldn't think of it.
I started learning CSS only about 6 years ago. So I had Stack Overflow and MDN web docs for it.
The answer, as with all code, is "you, six months from now".
Anything that makes your code less readable is a fail. I understand that people want to treat CSS and HTML as assembly, but that's a leaky metaphor, and only works insofar as you never have to debug an actual webpage.
Every place I've ever seen with tailwind has struggled with front end work, because the end result is so horribly abstracted from the code.
Yes, I know. Tailwind emits this kind of gibberish as a compilation step, which makes it much harder to figure out what's breaking when you're using a browser inspector or something. Which of the 83 different classes is the problem? Good luck!
You have to have a certain level of discipline to write clean CSS, but it really isn't that hard. It shouldn't take a 300-character inline style to make a button, when you can use CSS as intended, and have a class named "button".