Skip to content

Instantly share code, notes, and snippets.

@eri-trabiccolo
Created April 21, 2015 07:34
Show Gist options
  • Select an option

  • Save eri-trabiccolo/c7c919fbb7473a811ef4 to your computer and use it in GitHub Desktop.

Select an option

Save eri-trabiccolo/c7c919fbb7473a811ef4 to your computer and use it in GitHub Desktop.
Menu items selectors
/* 1st level */
.navbar .nav > li > a {
color: red;
}
/* 1st level hover/focus */
.navbar .nav > li > a:hover,
.navbar .nav > li > a:focus {
color: green;
}
/* 1st level current page and parent */
.navbar .nav > li.current-menu-item > a,
.navbar .nav > li.current-menu-ancestor > a {
color: black;
}
/* 2nd+ levels */
.dropdown-menu > li > a {
color: yellow;
}
/* 2nd+ levels hover/focus */
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a{
color: purple;
}
/* 2nd+ levels current page and parent */
.dropdown-menu>li.current-menu-ancestor>a,
.dropdown-menu>li.current-menu-item>a {
color: grey;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment