Hello folks, its not standard for me article, as I prefer to not get into these kind of discussions, I know this topic is very hot, and opinions are very divided.
What I want to focus here is some workflow change we have because of the CSS in JS. I have lately worked with a project where some CSS in JS was in use, also there was TypeScript and React included. We had in the project person whose responsibility was the part of CSS/HTML, it was kinda - webmaster, I even don't know how to name such person in the current terms, for sure FE engineer focused on CSS/HTML, for sure good in it. To the point, he was struggling with CSS in JS, he was not able to work efficient, he needed to write functions, write TS types, pass props, do standard coding. He was great in CSS, he knew the staff, he was in different level there, no comparison with my skills in CSS land. But amount of calls, amount of trouble in writing his part was tremendous. It was not a great experience for any of us. And interesting is, as I supposed its not very original experience, I found at least few developers who had the same issues in different project, I assume its just common thing.
My background is quite old, as when I was doing my first web-apps, HTML was generated in the server, there was separation of concerns in terms of technologies, we had HTML/CSS/JS separated, there were disadvantages yes, there were issues in terms of possible overwriting not related parts of the view, as CSS can modify everything in its global scope. But... we could have people who were responsible for the view part, they didn't need to know if the app is in React, Angular, Vue or any other. They have seen the output, they had style sheets, they just could work fully individual. Now they can't, now all devs needs to do HTML/CSS/JS in one time, and sorry not only that, add to it React, Vue and any other super-trendy framework, and you say why not, they should? I say - do you know CSS is turing complete language, do you know it is complicated language and in order have expertise in it you need years of practice? And do you know TypeScript type system is turing complete on its own ? Do you require the same efficiency of all developers in all 3 or even 4 languages in the FE side?
There are many things which are hard in CSS/HTML land, this land is complicated by itself, no JS/TS included.
We lost something, we lost possibility to share the work for people with different experiences and focus in the FE. Why somebody cannot just style the page? Why?
What is your opinion here? Maybe you have different experience? Share your thoughts in the comments.