Thursday, 10 November, 2022 UTC


The idea of generating CSS in JavaScript has become more popular over the last few years, largely thanks to the dominance of reactive frameworks like React and Svelte. Such frameworks do not enforce using JavaScript to style components, but they lend themselves to it. Consequently, a number of CSS-in-JS libraries have come forward to make the process easier.
This article introduces you to CSS-in-JS, then showcases a handful of promising frameworks for implementing it.
What is CSS in JavaScript?
Old-school CSS has basically two options: inline definition and loading from an external file. In both cases, the browser loads the CSS, parses it, then applies the styles to the markup. CSS-in-JS offers a third approach: delivering CSS by programmatically generating it in code. 
To read this article in full, please click here