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

What you describe is not representative of how CSS is maintained in most companies. You always end up in a situation where it's impossible to track down what styles affect what elements so you start overriding and duplicating because you're afraid to touch existing CSS.


How can it ever be impossible to track down styles? The browser dev tools will tel you exactly which styles apply to which element.


Come on, do you honestly gonna tell people that just because a Turing-machine somehow managed to untangle that mess, it is humanly parsable? Most sites are not HN with like 3 lines of CSS, dev tools will list you like 10s of different rulesets that together determine the output — of course one can see what’s the end result, but now try changing some property that gets applied by multiple rules. That can get very difficult/impossible since you may not have control over every stylesheet.


Nothing is impossible but it becomes hard because the element is styled through multiple cascades, and you need to track it down both ways. When changing a class or a style you need to know what elements that change affects, which will be hard to track down because of the same reasons.


Svelte, which is fairly mainstream these days looking at state of js, scopes your styles to the component.

So global styles are very rare and usually a bunch of branding variables these days.

Like a lot of bad solutions in tech, tailwind seems to exist as a workaround to the core issue of ‘still using react’.


Similar to Vue then, looks like. For me, CSS modules or CSS-in-TS solves our scoping problems in React.


Yes exactly. If react included scoped styles out of the box conflicts would be rare and tailwind would be far less popular.


Not really, you have intellectually missed some of the key reasons for Tailwind and why it's popular.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: