r/javascript • • Mar 14 '19

Why I Write CSS in JavaScript

https://mxstbr.com/thoughts/css-in-js/
0 Upvotes

9 comments sorted by

View all comments

2

u/dogofpavlov Mar 15 '19

My reason for CSS not being in Javascript is very very simple.

While I work on the javascript file, someone else can work on the CSS file.

1

u/Magnusson Mar 16 '19

CSS-in-JS doesn't require styles to be colocated with components -- you can still import a separate JS file that contains component styles.