You might note that the icons appear visually heavier than their adjacent text. The color is the same, but the icons carry greater visual weight. Let's adjust the icons to a lighter and less overpowering shade.
_navbar.less
in your editor..navbar-default
. We have used this class in our navbar markup to apply default styles. You should find it under the commented section for // Alternate navbars
..navbar-nav
and the > li >
selector nested beneath it. This is where we want to adjust our icon colors.@gray-light
, as follows:.navbar-nav { > li > a { color: @navbar-default-link-color; .icon { // added rule set color: @gray-light; }
@brand-primary
color. This requires adding our icons to the selector groups just below the lines we've added. Under the &:hover
, &:focus
pseudo-selectors, I've added two selectors to specifically target the icons:&:hover, &:focus, &:hover .icon, // added selector &:focus .icon { // added selector color: @navbar-default-link-hover-color; background-color: @navbar-default-link-hover-bg; }
I've targeted the icons for active links in the following code snippet:
> .active > a { &, &:hover, &:focus, .icon, // added selector &:hover .icon, // added selector &:focus .icon { // added selector color: @navbar-default-link-active-color; background-color: @navbar-default-link-active-bg; } }
This completes our nav—or almost completes it. We've inadvertently created a small problem that we need to fix before moving on.