Skip to content

Setting a delay on sl-tooltip #577

Answered by claviska
andregoldstein asked this question in Help
Discussion options

You must be logged in to vote

CSS custom properties in a component's docs need to be scoped to the element:

sl-tooltip {
  --show-delay: 2s; 
}

Note that the :host selector is only useful inside a shadow root. You won't be able to use it in your own styles.

Here's a working example: https://codepen.io/claviska/pen/NWvYqbx?editors=1100

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by claviska
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants