News for hackers. Stuff that matters.
Re:Why Tailwind CSS Won by meerita on Wednesday August 16, 2023 @05:55AM (#37144829)
If you work with components, you don't have this problem. If you don't work with components, good ol' search and replace and it's done.
Re:Why Tailwind CSS Won by scabby on Wednesday August 16, 2023 @05:58AM (#37144847)
If you work with components then why not just use CSS?
Re:Why Tailwind CSS Won by meerita on Wednesday August 16, 2023 @06:38AM (#37145106)
You can utilize the Functional CSS approach to eliminate the redundancy of architecture and behavior across various instances (JSX and CSS). Furthermore, it offers superior performance when compared to OOCSS.
Re:Why Tailwind CSS Won by red_admiral on Wednesday August 16, 2023 @06:09AM (#37144929)
In React at least, often you can live with One Component = One File at least for simple components. Adding separate CSS files, as the OP says, causes context-switching.

This is not true in svelte, where a component file can have both a root tag for the component, and a <style> tag that the framework/compiler automatically scopes to this component (and a <script> tag for the code, since you don't have the JSX inversion-of-control principle).