Book Image

Bootstrap Site Blueprints

Book Image

Bootstrap Site Blueprints

Overview of this book

Table of Contents (16 chapters)
Bootstrap Site Blueprints
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Adjusting the navbar icon color


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.

  1. Open _navbar.less in your editor.

  2. Search to find the selector .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.

  3. Within this nested set of rules, find the selector .navbar-nav and the > li > selector nested beneath it. This is where we want to adjust our icon colors.

  4. Under the statement defining nav item link colors, we'll nest a rule to make our icons a lighter shade, using our variable @gray-light, as follows:

    .navbar-nav {
      > li > a {
        color: @navbar-default-link-color;
    
        .icon { // added rule set
          color: @gray-light;
        }

    Tip

    The generic class icon proves to be a handy way to select all of our icons.

    Note

    I've begun adding...