JSS
JSS allows us to write CSS styles using JavaScript in a declarative way. This also means all the features of JavaScript are now available for writing CSS, making it possible to write reusable and maintainable styling code.
JSS works as a JS to CSS compiler that takes JS objects, where keys represent class names, with values representing corresponding CSS rules, and then generates the CSS along with scoped class names.
In this way, JSS generates unique class names by default when it compiles JSON representations to CSS, eliminating the chances of selector conflicts faced with external style sheets. Moreover, unlike inline styles, CSS rules defined with JSS can be shared across multiple elements and all CSS features can be used in the definitions. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access