Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
theuser48024yThey have this playground:
https://play.tailwindcss.com
Notice the excessive non-semantic classnames . -
jiffier1724y@theuser That's my point. It's ridiculous and goes against proper use of "cascading stylesheets". All It does is that instead of having to write style="color: blue", I have to write class="text-blue". The rest is just inline styling, which is suposed to be a very bad practice. So we have gone full circle in stupidity or am I missing something?
-
theuser48024y@jiffier Yeah, the cascading part has become a problem on large scale which means stricter naming conventions or something like BEM. Our current solution is scoped stylesheets which has a maintainability problem.
We don't really have a good solution at scale, except maybe webcomponents shadow DOM. -
Tailwind revolves around utility-first approach. Once you catch upon, it's more convenient than mixing properties in stylesheet. Plus you write less to get unique designs at demand, CSS becomes a thing for more complex effects or highly reused components, so it generally weights less than before (race for milliseconds, I suppose, but useful for audit).
-
Another idea I like about Tailwind is that they have appropriate category for each class, and I can sort all these either by using categories' order or alphabetically - just like you do with stylesheets, except that now you insert class names in HTML and you don't need to create your class names for mere presentational elements.
-
If you manage to write large scale apps while actively taking advantage of the cascade, more power to you.
But for most it is a nuisance – and goes against some of the most fundamental programming patterns (e.g. encapsulation)
Tailwind takes the good parts of inline styles (you immediately see and understand how sth. is styled instead of having to come up with 'clever' names and wade through huge stylesheets to find the relevant parts, massive context switches all the time), but adds the missing features and makes you use only predefined classes from a design system instead of letting you chose any colors and sizes like it's the wild west -
@21stCenturyJoku Yeah, especially when it comes to names, BEM is powerless against people's naming biases. Even such small thing as "placeholder" can be called anything else and then lead to misinterpretations that only keep piling up.
-
I have mixed opinion of TailwindCSS. I think it's great for less experienced CSS slaves. In order to have clean and readable templates it is necessary to use SCSS with @apply or you have completely cluttered HTML files.
I think the greatest parts of Tailwind are the docs and the handy VSCode extension.
Related Rants
TailwindCSS, I don't get the hype around it. People say its awesome and it has changed its life. Wtf, it looks like a bunch of utility classes to end up writing inline styles.
question
tailwind
css