After reading the excellent article it hit me, I'm already doing the exact same :facepalm:
There is really no difference, instead of a string with classes I have a bunch of props. Time to look at tailwind again...
11–17 of 17 posts
After reading the excellent article it hit me, I'm already doing the exact same :facepalm:
There is really no difference, instead of a string with classes I have a bunch of props. Time to look at tailwind again...
Separation Of Concerns (HTML CSS) is a LIE. Naming is one of the hardest things in computer science, and folks in the "Separation Of Concerns" camp repeatedly subject themselves to this torture by forcing themselves to come up with "semantic" names instead of just writing the damn styles and seeing which styles get repeatedly used together so that they can be condensed into a class.
I'm a long time material ui user and always disliked the tailwind approach of slapping classnames in a long string. After reading the excellent article it hit me, I'm already doing the exact same :facepalm: There is really no difference, instead of a string with classes I have a bunch of props. Time to look at tailwind again...
It's just easier to do fast proto-typing with various Tailwind classes, and then refactor common sets of HTML tags with tailwind classes, they become reusable React (or Svelte) components.
> There should be a German noun for the fear of breaking something in a CSS codebase. Webseitenstilzerschütterungsangst?
Maybe I'm the minority here, but with something like Vite I can import a css file directly into a given component's file and call it a day. Haven't worried about scoping in forever, and only need to manage a number of distinct, small, and comprehensible css files.
When talking about CSS-in-JS I am reminded of the short lived escapade at Netscape around 1997/1998 when they launched JSSS, only be be shut out by Microsoft ignoring support for it in the increasingly dominant Internet Explorer as they favored CSS. As a result it died and disappeared. http://sunsite.uakom.sk/sunworldonline/swol-04-1997/swol-04-...
Deserves a (2020) tag I think, given the regular references to "current times", plus the rate of change in the CSS/JS space