|
|
|
|
|
by forsythe
2699 days ago
|
|
Personally, I don't mind the concept. I can write CSS on a microwave if I have to. But CSS is supposed to be simple, not to be mixed with JS. There are good designers out there who know HTML and CSS but not JS. This will lead to a problem for those people. Let's be honest, you cannot just jump into a React component and edit CSS if your knowledge of JS is slim to none. |
|
CSS-in-JS (or if not, BEM at the least) is a closer fit to the mental model of styling things in design software like Sketch and Figma. So having to use CSS in full utilising-the-cascade-and-complex-selectors mode could reasonably be seen as a bigger barrier to entry than just using something like Styled Components or Emotion. I've come across plenty of designers comfortable with CSS who felt more at home using Styled Components.
I'm not arguing that there won't be some people for whom CSS-in-JS creates barriers, but there will also be others for whom it knocks them down.