News for hackers. Stuff that matters.
Re:Signals for Tailwind CSS (styling based on ancestor state... by krsdcbl on Saturday August 31, 2024 @06:45PM (#41412612)
Tbh I never really understood the reason for the existence of css-in-js either.

Just do vanilla `<style> @scope { /* your component styles without any naming bloat ... */ } </style>` nested in the markup/jsx, and optionally leave merging any of that for perf optimisation to some rudimentary build tooling or hydration

But also: I do see the QoL benefits of colocating styles & markup, but it has drawbacks aswell: it prevents you from being able to reuse design systems across different applications/codebases, and increases maintenance complexity and tech debt as soon as you introduce utility classes or any styling rules that aren't hard-tied to a singular component. Both issues scale painfully fast with the complexity of your App/UI, and impact Tailwind-based UIs even more in my experience.

Re:Signals for Tailwind CSS (styling based on ancestor state... by paulddraper on Sunday September 01, 2024 @12:35AM (#41414327)
For one thing, Firefox.