Skip to content

sl-menu-item hover states #1185

Answered by claviska
Jaylyn-Barbee asked this question in Help
Discussion options

You must be logged in to vote

There are two states, hover and focus. Try this:

/* Hover state */
sl-menu-item::part(base):hover {
  background: green;
  color: white;
}

/* Focus state */
sl-menu-item:focus-within::part(base) {
  background: tomato;
  color: white;
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Jaylyn-Barbee
Comment options

Answer selected by Jaylyn-Barbee
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