by javitury · 5y ago · 0 comments
Custom css properties are used to personalize colors, which would also work with shadowDom.
background-color: var(--color-menu-bg-active);
These custom properties are declared in light.scss and applied to the body, using the selector [data-color-mode="light"].
This method is fairly standard and widely used in modern websites. The only downside is that IE11 doesn't support custom properties and, in my expierience, there is no polyfill or postcss plugin that is 100% reliable.