_main-header.scss 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. //
  2. // Component: Main Header
  3. //
  4. .main-header {
  5. border-bottom: $main-header-bottom-border;
  6. z-index: $zindex-main-header;
  7. .nav-link {
  8. height: $nav-link-height;
  9. position: relative;
  10. }
  11. .text-sm &,
  12. &.text-sm {
  13. .nav-link {
  14. height: $nav-link-sm-height;
  15. padding: $nav-link-sm-padding-y $nav-link-padding-x;
  16. /* stylelint-disable selector-class-pattern */
  17. > .fa,
  18. > .fas,
  19. > .far,
  20. > .fab,
  21. > .fal,
  22. > .fad,
  23. > .svg-inline--fa,
  24. > .ion {
  25. font-size: $font-size-sm;
  26. }
  27. /* stylelint-enable selector-class-pattern */
  28. }
  29. }
  30. .navbar-nav {
  31. .nav-item {
  32. margin: 0;
  33. }
  34. &[class*="-right"] {
  35. .dropdown-menu {
  36. left: auto;
  37. margin-top: -3px;
  38. right: 0;
  39. @media (max-width: breakpoint-max(xs)) {
  40. left: 0;
  41. right: auto;
  42. }
  43. }
  44. }
  45. }
  46. &.dropdown-legacy .dropdown-menu {
  47. top: $nav-link-height + $navbar-padding-y;
  48. margin-top: 0;
  49. }
  50. }
  51. // Add this class to images within a nav-link
  52. .navbar-img {
  53. height: calc(#{$main-header-height} * .5);
  54. width: auto;
  55. }
  56. // Navbar badge
  57. .navbar-badge {
  58. font-size: .6rem;
  59. font-weight: 300;
  60. padding: 2px 4px;
  61. position: absolute;
  62. right: 5px;
  63. top: 9px;
  64. }
  65. .btn-navbar {
  66. background-color: transparent;
  67. border-left-width: 0;
  68. }
  69. .form-control-navbar {
  70. border-right-width: 0;
  71. + .input-group-append {
  72. margin-left: 0;
  73. }
  74. }
  75. .form-control-navbar,
  76. .btn-navbar {
  77. transition: none;
  78. }
  79. .navbar-dark {
  80. .form-control-navbar,
  81. .btn-navbar {
  82. background-color: $main-header-dark-form-control-bg;
  83. border-color: $main-header-dark-form-control-border-color;
  84. }
  85. .form-control-navbar {
  86. &::placeholder {
  87. color: $main-header-dark-placeholder-color;
  88. }
  89. + .input-group-append > .btn-navbar {
  90. color: $main-header-dark-placeholder-color;
  91. }
  92. &:focus {
  93. &,
  94. + .input-group-append .btn-navbar {
  95. background-color: $main-header-dark-form-control-focused-bg;
  96. border-color: $main-header-dark-form-control-focused-border-color !important;
  97. color: $main-header-dark-form-control-focused-color;
  98. }
  99. }
  100. }
  101. }
  102. .navbar-light {
  103. .form-control-navbar,
  104. .btn-navbar {
  105. background-color: $main-header-light-form-control-bg;
  106. border-color: $main-header-light-form-control-border-color;
  107. }
  108. .form-control-navbar {
  109. &::placeholder {
  110. color: $main-header-light-placeholder-color;
  111. }
  112. + .input-group-append > .btn-navbar {
  113. color: $main-header-light-placeholder-color;
  114. }
  115. &:focus {
  116. &,
  117. + .input-group-append .btn-navbar {
  118. background-color: $main-header-light-form-control-focused-bg;
  119. border-color: $main-header-light-form-control-focused-border-color !important;
  120. color: $main-header-light-form-control-focused-color;
  121. }
  122. }
  123. }
  124. .navbar-search-block {
  125. .form-control-navbar {
  126. &:focus {
  127. &,
  128. + .input-group-append .btn-navbar {
  129. color: $main-header-light-placeholder-color;
  130. }
  131. }
  132. }
  133. }
  134. }
  135. // Navbar Search
  136. .navbar-search-block {
  137. position: absolute;
  138. padding: 0 $nav-link-padding-x;
  139. left: 0;
  140. top: 0;
  141. right: 0;
  142. bottom: 0;
  143. z-index: 10;
  144. display: none;
  145. justify-content: center;
  146. flex-direction: column;
  147. background-color: initial;
  148. &.navbar-search-open {
  149. display: flex;
  150. }
  151. .input-group {
  152. width: 100%;
  153. }
  154. }