Use CSS Variables
Web Components ⟩ Shadow DOM ⟩ Styling ⟩
Google ⟩ Web Component ⟩ Creating style hooks using CSS custom properties
<style>
fancy-tabs {
margin-bottom: 32px;
--fancy-tabs-bg: black; <!-- ⭐️ css var -->
}
</style>
<fancy-tabs background>...</fancy-tabs>
Last updated
Was this helpful?