Smart Styling Of Web Components

How to leverage state-based styling the smart way

Danny Moerkerke
JavaScript in Plain English
7 min readNov 17, 2020

--

Photo by Scott Webb on Unsplash

One of the killer features of Web Components is true encapsulation of styling through Shadow DOM.

This means that the internal CSS of a Web Component can be completely isolated from the surrounding document without the need for a particular naming convention.

--

--