Tools like Tailwind may help you develop your hobby project faster, but the thing is...
You should use HTML to describe the content, hierarchy and structure, not how it looks. You should use semantic HTML tags like
<figure> instead of
<div>. Then you style the content using the classes corresponding to the type of content, like
"testimonials" instead of
"bg-slate-100 rounded-xl p-8 dark:bg-slate-800".
That's why they removed a bunch of presentation tags from HTML, like
<center> etc. Your website should be readable even without a single line of CSS/JS, only with the help of the right structured HTML. I encourage everyone to do some research on things like progressive enhancement and graceful degradation.
There are tons of benefits in using HTML and CSS as they are intended to be used.
- More accessible website,
- better SEO,
- performance improvements thanks to smaller HTML/CSS size and caching,
- and you potentially avoid legal issues in future.
Just because something is easier doesn't mean it's the right way to do it.
I get it, it's mentally draining to analyze the type of the content, name it correctly. But our job, as developers, is to do exactly that. Translate business requirements and domain knowledge to code, without ambiguity and without context loss.
It may be hard for some to learn CSS. The alternative? We learn a new framework, tool, library, utility every week. Learning and mastering CSS can't be much harder than that.
Tailwind may be great for hobby or POC projects. But for enterprise projects that tend to scale vanilla HTML/CSS is the way to go.
HTML and CSS are not perfect, but I'd rather we improve existing solutions, than come up with newer, shiny bad tools that try to solve the very problem they introduce.