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

As a react dev, I don't like CSS in JS either. It brings back the old font tag approach of individually styling components.

As an alternative, you can just assign class names to components and use global CSS like the old days, if you prefer. Sass is pretty great, basically CSS with better selectors and variables.



Exactly. Something like Tailwind should be done in the Sass, not by assigning a gazillion helpers.

Have a component-type class in the component then use Sass to configure that with helper properties (read: functions and mixins, etc.)

But hardcoding? Inline? I did that in 1997.

Keyword in. I know TW is done with Sass




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: