Skip to content

customize button hover color #903

Answered by claviska
Chandler-Zhu asked this question in Help
Discussion options

You must be logged in to vote

This can be done by customizing the button's base part.

sl-button[variant="default"]::part(base):hover {
  border: blue;
  background: blue;
  color: white;
}

sl-button[variant="default"]::part(base):active {
  border: darkblue;
  background: darkblue;
  color: white;
}

Example: https://codepen.io/claviska/pen/bGMVKQd?editors=0100

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jonasbirkelof
Comment options

@claviska
Comment options

Answer selected by Chandler-Zhu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants