Ben Lorantfy
Dec 4, 2020

--

If I convince 1 person to use css modules instead of a global style sheet, I'd be extremely happy. As someone who has worked on projects that use global css, as well as using some kind of encapsulated css, I can tell you its much much easier to work with encapsulated css.

My article was geared towards developers working on SaaS products. It wasn't really geared towards developers working on creating 3rd party UI component libraries (or "commercial templates", as you refer to).

However, in terms of 3rd party libraries, there are ways to make those theme-able without relying on over-riding global css. I'd actually be scared of doing that. My over-rides could break any time I upgrade the 3rd party library.

As an example, material-ui has a powerful theming system: https://material-ui.com/customization/theming/

--

--

Ben Lorantfy
Ben Lorantfy

Written by Ben Lorantfy

A software and web developer who likes solving problems with code, math, and design 🇨🇦

No responses yet