Skip to content

Unable to style nav link on hover #16206

Answered by ecraig12345
noneall asked this question in Q&A
Discussion options

You must be logged in to vote

You can do this using a .ms-Nav-compositeLink:hover selector within styles.link:

const styles: Partial<INavStyles> = {
  link: {
    '.ms-Nav-compositeLink:hover &': {
      backgroundColor: 'purple' // your real styling here
    }
  }
};

Here's a live demo: https://codepen.io/ecraig12345/pen/abZjZme

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JustSlone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #16206 on December 11, 2020 20:55.