3
jiffier
12d

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.

Comments
  • 1
    Yes, that's usually what CSS frameworks are
  • 2
    They have this playground:
    https://play.tailwindcss.com

    Notice the excessive non-semantic classnames .
  • 2
    @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?
  • 1
    @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.
  • 3
    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).
  • 1
    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.
  • 2
    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
  • 0
    @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.
  • 0
    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.
Add Comment