Skip to content

Instantly share code, notes, and snippets.

@domenic
Last active September 19, 2016 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domenic/fa84dddf918014b2fd9c853ba9b4aa86 to your computer and use it in GitHub Desktop.
Save domenic/fa84dddf918014b2fd9c853ba9b4aa86 to your computer and use it in GitHub Desktop.
<!-- inside shadow root -->
<style>
.up-stepper {
@apply --up-stepper;
}
</style>
<div class="up-stepper"></div>
<!-- outside -->
<style>
my-fancy-slider {
--up-stepper: {
color: blue;
margin: 5px;
}
}
</style>
<!-- inside shadow root -->
<script>
findUpStepper().exposeAsPseudoPart("up-stepper");
</script>
<div class="up-stepper"></div>
<!-- outside -->
<style>
my-fancy-slider::part(up-stepper) {
color: blue;
margin: 5px;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment