Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've tried Tailwind on smaller projects and it's not a bad way of writing styling. Not having to think about class naming or selectors speeds things up a bit, and it's nice that it promotes only shipping the styles you need (i.e. no classes with lots of the same properties declared).

However, one thing I'm still wondering about is how easy it would be to maintain visual consistency in a large project with lots of components, and lots of different developers working on different parts of the app.

Say the branding guidelines a certain style, like rounded corners with some shadowing and a hover styles, something that can't be done with a simple utility class. This should be consistent across many different components and pages. Then, someone in design updates the guidelines to have a different value for rounding and shadows.

With Tailwind out of the box, each component now has to be updated separately, and developers have to remember, or at least be able to check in documentation if that exists, which components use this particular style.

Is the answer then simply to use @apply for combinations of style? Doesn't this simply re-invent CSS classes, and create another layer of abstraction (you now have a class, which is composed of other classes, which themselves are composed of values set in custom properties).

I'd be very interested to hear how people manage this in large teams, over time.



We defined Tailwind config overriding the default values to match our design system.

Then on top of this we have components library with common basic components and layouts

Then inside the apps we use the components and that Tailwind config and it works quite nice.

We have rules for tokenized colors and sizes so it all references the config.

There are problems and all, but all in all I think is quite good


That makes sense, but what value does TW add? Why have that dependency? And not have the team roll your own CSS?


Because you can ship in a few days instead of wasting weeks trying to bike shed through something as basic as css.

Use tailwind as a tool, have a component library that can be put together in a couple days max, and now you have ubiquitous styling language and don’t need to waste hours on css of all things.

There are bigger fish to fry.


Well you don't override everything but just what you need. Then devs can still use Tailwind docs on how to use the classes and all




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: