3 ms·
> Why I Write CSS in JavaScript tl;dr because it's convenient. It's also redundant, goes completely against the features of CSS (the cascading part), doesn't
by pmlnr 8y ago
> Why I Write CSS in JavaScript
tl;dr because it's convenient.
It's also redundant, goes completely against the features of CSS (the cascading part), doesn't utilize the possibility of selectors, children, etc, ugly, and computationally heavy.
But yeah, why not.
- zeveb 8y agoNot to mention that it doesn't work without JavaScript enabled on the client (unless he's generating CSS in server-side JavaScript). That's fine for a true web app (and web apps do have their place), but it's completely not fine for a web page, which should display just fine without JavaScript. People should not be forced to grant you permission to execute code in order to read text & view images.