Advertisement
johnbacon

Untitled

Mar 5th, 2020
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.35 KB | None | 0 0
  1. /*------------------------------------*\
  2.     $NAV BAR
  3. \*------------------------------------*/
  4.  
  5. /*
  6.  * The bar that appears below the main navigation.
  7.  *
  8.  * 1. Hide the bar (designed for desktop) at the same size we hide the main
  9.  * navigation.
  10.  */
  11.  
  12. .nav-bar {
  13.     background-color: #ffffff;
  14.     // @extend .bg--darker-gray;
  15.     @media (max-width: $desktop-navigation-display-breakpoint - 1px) { /* 4 */
  16.         display: none;
  17.     }
  18. }
  19.  
  20.     /*
  21.      * 1. This should roughly match the implementation (width, padding and centering)
  22.      * of the main desktop navigation.
  23.      * 2. Used to visually pull the nav bar links (including padding) into line with
  24.      * the desktop navigation.
  25.      */
  26.  
  27.     .nav-bar__inner-container {
  28.         display: flex;
  29.         justify-content: space-between;
  30.         align-items: center;
  31.         height: $base-line-height * 3;
  32.         padding-right: 15px; /* 1 */
  33.         padding-left: 15px; /* 1 */
  34.         max-width: $global-width; /* 1 */
  35.         margin: 0 auto; /* 1 */
  36.         position: relative; /* 2 */
  37.         left: -12px; /* 2 */
  38.     }
  39.  
  40.         /*
  41.          * 1. Necessary for proper height computation.
  42.          */
  43.  
  44.         .nav-bar__list {
  45.             display: flex;
  46.  
  47.             li {
  48.                 display: flex;
  49.                 align-items: center;
  50.                 list-style-type: none; /* 1 */
  51.             }
  52.         }
  53.  
  54.             /*
  55.              * 1. Override default anchor styles.
  56.              */
  57.  
  58.             .nav-bar__link {
  59.                 display: flex;
  60.                 align-items: center;
  61.                 position: relative;
  62.                 padding: 8px 0;
  63.                 margin: 0 20px;
  64.                 color: $secondary-color;
  65.                 opacity: 0.5;
  66.                 font-size: 14px;
  67.                 line-height: 14px;
  68.                 &:hover,
  69.                 &:focus,
  70.                 &.active {
  71.                     opacity: 1; /* 1 */
  72.                 }
  73.  
  74.                 &.active {
  75.                     &:after {
  76.                         content: '';
  77.                         position: absolute;
  78.                         bottom: -21px;
  79.                         left: 0;
  80.                         height: 2px;
  81.                         width: 100%;
  82.                         background-color: $primary-color;
  83.                     }
  84.                 }
  85.             }
  86.  
  87.  
  88.  
  89.  
  90.  
  91. /*
  92.  * 1. 16px is the same as the mobile menu.
  93.  * 2. Don't show for large sizes.
  94.  */
  95.  
  96. .nav-bar-small {
  97.     display: flex;
  98.     justify-content: center;
  99.     align-items: center;
  100.     flex-direction: column;
  101.     padding: 16px 24px; /* 1 */
  102.     background-color: #ffffff;
  103.     border-bottom: 2px solid $global-border-color;
  104.     @media (min-width: $desktop-navigation-display-breakpoint) { /* 2 */
  105.         display: none;
  106.     }
  107. }
  108.  
  109. .nav-bar__upgrade-container {
  110.     display: flex;
  111.     flex-direction: column;
  112. }
  113.  
  114. .nav-bar__upgrade-container a {
  115.     padding-top: 10px !important;
  116.     padding-bottom: 10px !important;
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement