​​Choosing Between SASS vs CSS Modules vs CSS-In-JS

Written by ndimares | Published 2022/07/16
Tech Story Tags: react | css | js | sass-vs-css | css-in-js | javascript | javascript-development | javascript-fundamentals

TLDRWe chose to move forward with CSS-in-JS as our primary styling mechanism in order for the UIs we build to be easily embeddable within external UIs. We’d love to know your thoughts and how you reached decisions about styling your UI.via the TL;DR App

We are in the midst of building the first version of our API Ops platform. One of the components which we are actively building is a developer console where devs can get an overview of their APIs and each endpoint’s performance. While building our UI, we are debating many of the fundamental front end architecture decisions that will shape our UI development. One of the biggest debates thus far was whether we would use SASS or CSS-In-JS for our styling.

We know developers are facing these same questions every day, so we want to publish our thoughts in case they are useful to anyone else. Ultimately, we chose to move forward with CSS-In-JS as our primary styling mechanism for reasons specific to our business; we considered it important for the UIs we build to be easily embeddable within external UIs. We felt that CSS-In-JS was the best option for embeds, because integrators wouldn’t need to worry about dealing with style injection, and could theme our components into their style.

We’d love to know your thoughts and how you reached decisions about styling your UI? Have you had any bad experiences with CSS-In-JS?

Below is our full internal conversation only minimally edited for brevity:


Written by ndimares | Founding team @ Speakeasy, Making it easy to integrate with every API.
Published by HackerNoon on 2022/07/16