This is an RFC on a proposal to introduce silent classes to CSS. This concept borrows heavily from the abandoned @apply
specification while hopefully learning from the places that particular API failed.
Styles cannot be reused across instances of DocumentOrShadowRoot
. While the shadow DOM’s encapsulation is incredibly powerful and enables developers to have full control over portions of the DOM, there are often rules that design system authors might want to reuse across contexts.
While some recent proposals will allow for style sharing across shadow roots (like constructible stylesheets and CSS module scripts), often times the target node type is different (between something like a div
and
:host`).