Hacker News new | ask | show | jobs
by dt2m 1389 days ago
I would argue that any HTML + CSS framework stack is inherently flawed once you move beyond the most basic of UI components.

I have yet to work on a React + Tailwind codebase in the wild where the margin/padding metrics aren't hardcoded and repeated across tens of different components. We've traded the elegance of well-written SCSS for improved developer ergonomics and faster build times because webpack is so slow at compiling stylesheet changes.

If you want to practise proper DRY for spacing, typography, etc. in a React app, you'll just end up nesting tons of components that ultimately result in needless complexity.

1 comments

Then you haven’t seen my company’s codebase ;) this is where CSS in JS done well shines - you can use JS standard modules to handle all this code sharing. Choose the right abstractions - in my experience 90% of UIs can be expressed as sets of evenly spaced stacks of elements (horizontal or vertical) and if you export well thought out mixins that express that concept and your team understands why they should use them, you’re most of the way there.