|
|
|
|
|
by boredtofears
1033 days ago
|
|
Type safety in templating has been available for templating systems that are built on statically typed languages for literally decades now. This isn't anything new, it's just new to javascript solely because of typescript. None of the concepts you're talking about are unique to SPA's. A cursory search for "CSS modules rails" or "tailwind django" turned up several pages of results. |
|
Likewise, your cursory search for CSS modules in rails mainly returns blog posts where people try and hack things together to get CSS modules working well enough. The top result for me literally wrote "I tried to find a cool way to integrate CSS Modules into our Rails project, but I cannot", then explains how they parsed CSS by themselves. (I can't get further than that, because Medium.) Meanwhile, adding CSS modules to a project bundled with Vite is literally just a matter of naming your files `.module.css` instead of just `.css`.
Tailwind is a bit of an exception, as it seems to be more popular with backend frameworks, I think because it relies less on Javascript idioms like imports. I suspect we'll see it - or at least similar ideas - integrated into more frameworks over time.
But to me coming from the frontend, this sort of stuff is table-stakes - having IDE support, having Typescript support (and good TS support), being immediately accessible without spending a day fiddling with fifteen different plugins, etc.