_header.scss 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. // Header styling
  2. $dropdown-color: #f6f6f6;
  3. #header {
  4. @extend .default-animation;
  5. @extend .padding-horiz;
  6. position: fixed;
  7. z-index: 10;
  8. width: 100%;
  9. height: $header-height;
  10. background-color: white;
  11. box-shadow: 0 0.05rem 1rem rgba(0,0,0, 0.15);
  12. #logo img {
  13. display: flex;
  14. flex-direction: row;
  15. flex-flow: row;
  16. // max-height: $header-height;
  17. }
  18. // scroll based changes
  19. &.scrolled {
  20. height: $header-height - 2rem;
  21. background-color: rgba(255,255,255,0.90) !important;
  22. box-shadow: 0 0.05rem 1rem rgba(0,0,0, 0.15) !important;
  23. #logo h3 {
  24. color: $core-text !important;
  25. font-size: 1.6rem !important;
  26. }
  27. #logo a, #navbar span {
  28. color: $black !important;
  29. }
  30. #navbar a {
  31. color: $black !important;
  32. &:hover {
  33. color: darken($core-accent, 20%) !important;
  34. }
  35. }
  36. #navbar a:before, #navbar a:after {
  37. background-color: $core-accent !important;
  38. }
  39. .navigation {
  40. margin-top: 0.5rem !important;
  41. }
  42. }
  43. // set heights for vertical centering
  44. > .grid, #logo, #navbar {
  45. height: 100%;
  46. }
  47. #logo {
  48. float: left;
  49. h3 {
  50. @extend .default-animation;
  51. @extend %vertical-align;
  52. font-size: 2rem;
  53. line-height: 2rem;
  54. margin: 0;
  55. a {
  56. color: $black;
  57. }
  58. }
  59. }
  60. #navbar {
  61. font-size: $core-font-size + 0.4rem;
  62. /* Child Indicator */
  63. .has-children {
  64. & > a {
  65. & > span {
  66. display: inline-block;
  67. padding-right: 8px;
  68. &:after {
  69. font-family: FontAwesome;
  70. content: '\f107';
  71. position: absolute;
  72. display: inline-block;
  73. right: 8px;
  74. top: 4px;
  75. }
  76. }
  77. &:after, &:before {
  78. display: none;
  79. }
  80. }
  81. & .has-children > a > span:after {
  82. content: '\f105';
  83. }
  84. }
  85. .navigation > .has-children:hover > a {
  86. background: $dropdown-color;
  87. border: 1px solid darken($dropdown-color, 4%);
  88. border-bottom-color: $dropdown-color;
  89. margin: -1px -1px 0 -1px;
  90. z-index: 1000;
  91. position: relative;
  92. padding-bottom: 1px;
  93. }
  94. ul {
  95. margin: 0;
  96. padding: 0;
  97. list-style: none;
  98. text-transform: uppercase;
  99. &.navigation {
  100. display: inline-block;
  101. float: right;
  102. @extend .default-animation;
  103. margin-top: 1.4rem;
  104. li {
  105. float: left;
  106. position: relative;
  107. a {
  108. font-family: $font-family-header;
  109. display: inline-block;
  110. padding: 0.3rem 0.8rem;
  111. -webkit-backface-visibility: hidden;
  112. // &:before, &:after {
  113. // content: "";
  114. // position: absolute;
  115. // width: 100%;
  116. // height: 1px;
  117. // bottom: 0;
  118. // left: 0;
  119. // background-color: $core-accent;
  120. // visibility: hidden;
  121. // @include transform(scaleX(0));
  122. // @include transition(all 0.2s ease);
  123. //
  124. // }
  125. &:hover:before {
  126. visibility: visible;
  127. @include transform(scaleX(0.75));
  128. }
  129. &.active:after {
  130. top: 0;
  131. visibility: visible;
  132. @include transform(scaleX(0.75));
  133. }
  134. }
  135. &.active {
  136. a:after {
  137. top: 0;
  138. visibility: visible;
  139. @include transform(scaleX(0.75));
  140. }
  141. }
  142. /*Active dropdown nav item */
  143. ul {
  144. position: absolute;
  145. background-color: $dropdown-color;
  146. border: 1px solid darken($dropdown-color, 4%);
  147. border-top: 0;
  148. min-width: 12rem;
  149. text-align: left;
  150. z-index: 999;
  151. left: -1px;
  152. display: none;
  153. }
  154. ul li {
  155. display: block;
  156. float: none;
  157. /* Active Dropdown nav item */
  158. &.active > a {
  159. background-color: darken($dropdown-color, 4%);
  160. color: $core-accent;
  161. }
  162. &:hover > a {
  163. background-color: $core-accent;
  164. color: $white;
  165. }
  166. a {
  167. display: block;
  168. margin: 0 -1px;
  169. &:after, &:before {
  170. display: none;
  171. }
  172. }
  173. }
  174. /* Dropdown CSS */
  175. ul ul {
  176. left: 100%;
  177. top: 0px;
  178. }
  179. /* Active on Hover */
  180. &:hover > ul {
  181. display: block;
  182. }
  183. }
  184. @include breakpoint(desktop-only) {
  185. display: none;
  186. }
  187. }
  188. }
  189. .panel-activation {
  190. @extend %vertical-align;
  191. padding: 1rem;
  192. display: none;
  193. font-size: 1.8rem;
  194. cursor: pointer;
  195. float: right;
  196. @include breakpoint(desktop-only) {
  197. display: inline-block;
  198. }
  199. }
  200. }
  201. }
  202. // Header Image
  203. .header-image {
  204. &.fullwidth {
  205. #body {
  206. padding-left: 0;
  207. padding-right: 0;
  208. >.listing-row {
  209. padding-left: $padding-horiz;
  210. padding-right: $padding-horiz;
  211. }
  212. }
  213. }
  214. .listing-row:last-child {
  215. margin-bottom: 2rem;
  216. }
  217. #body {
  218. .flush-top {
  219. margin-top: - $header-height - $padding-vert - 1.5rem;
  220. padding-top: $header-height + 4rem;
  221. }
  222. }
  223. #breadcrumbs {
  224. margin-top: 1rem;
  225. }
  226. #header {
  227. background-color: rgba($header-text,0);
  228. box-shadow: none;
  229. .navigation .has-children:hover a {
  230. color: $core-accent;
  231. }
  232. #logo h3, #logo a {
  233. color: $header-text;
  234. }
  235. a, .menu-btn {
  236. color: $header-text;
  237. }
  238. a:before, a:after {
  239. background-color: rgba($header-text,0.7) !important;
  240. }
  241. }
  242. }