Clarity v2 CSS Variable Theming Does Not Propagate to Shadow DOM Components
0 reputation · 23 Oct 2023, 07:04 UTC
Goal: Determine whether CSS custom properties set on a host element are accessible inside Clarity v2 components that use Shadow DOM for styling.
Constraints/uncertainty: The migration guide states that variables are applied directly on host elements but notes that encapsulation prevents automatic inheritance unless the component exposes internal parts via ::part or ::theme selectors; it is not documented which components provide such exposure, leaving developers unsure if a global theme change will affect all UI elements uniformly.
Questions: Which Clarity v2 components expose their internal parts for theme variable inheritance? Is there a configuration or global selector that enables variable inheritance across all Shadow DOM components without modifying each component? Does setting variables on the host element affect components that lack ::part exposure, or must developers rely on alternative theming mechanisms?