top | item 35354657

(no title)

eajakobsen | 2 years ago

I really like CSS, and in my personal projects I don't use Tailwind.

However, I use it in my day job, and here it is useful to us as a team. The variables combined with the tooling ensures we write consistent styles across our site. The color names and text sizes also correspond to what our design team uses in Figma, making implementing and updating designs quick.

That said, I still find it a pain to read, and we could probably have set up something very similar with CSS Custom Properties.

discuss

order

eurasiantiger|2 years ago

SCSS wins for maintainability.

You could import your favourite design framework (say, bootstrap) as SCSS, change its variables to suit your design, and create any custom components using @extend:

    .custom-component {
      @extend .some-bootstrap-class
    }
Also nothing prevents you from creating mixins, functions, etc.

Just keep it first-order, as SCSS functions cannot return new functions.

jeffhuys|2 years ago

In tailwind, it's in the tailwind config. Same stuff, basically.