Skip to content

Instantly share code, notes, and snippets.

@djsauble
Created June 1, 2016 22:05
Show Gist options
  • Save djsauble/d6687dca9c38ef9c7b2a4fd3a910ccda to your computer and use it in GitHub Desktop.
Save djsauble/d6687dca9c38ef9c7b2a4fd3a910ccda to your computer and use it in GitHub Desktop.
/* Add a caret to the active menu item */
.sonatype-primary-nav ul li.hs-menu-depth-1 > a::after {
content: "";
width: 0;
height: 0;
position: absolute;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 12px solid transparent;
left: 50%;
top: 38px;
margin-left: -8px;
}
/* Hide the caret on mobile */
@media (max-width: 767px) {
.sonatype-primary-nav ul li.hs-menu-depth-1 > a::after {
border: 0;
}
}
/* Assign an appropriate color to the nav caret, depending on the main color of the page */
.sonatype-products .sonatype-primary-nav ul li.hs-menu-depth-1:nth-child(1) > a::after,
.sonatype-heroes .sonatype-primary-nav ul li.hs-menu-depth-1:nth-child(2) > a::after,
.sonatype-industries .sonatype-primary-nav ul li.hs-menu-depth-1:nth-child(3) > a::after,
.sonatype-learning .sonatype-primary-nav ul li.hs-menu-depth-1:nth-child(4) > a::after {
border-bottom-color: #336699;
}
.sonatype-repository .sonatype-primary-nav ul li.hs-menu-depth-1:nth-child(1) > a::after {
border-bottom-color: #46956d;
}
.sonatype-auditor .sonatype-primary-nav ul li.hs-menu-depth-1:nth-child(1) > a::after {
border-bottom-color: #885195;
}
.sonatype-firewall .sonatype-primary-nav ul li.hs-menu-depth-1:nth-child(1) > a::after {
border-bottom-color: #6c5896;
}
.sonatype-lifecycle .sonatype-primary-nav ul li.hs-menu-depth-1:nth-child(1) > a::after {
border-bottom-color: #4f5f98;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment