_header.scss 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  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. &:hover:before {
  125. visibility: visible;
  126. @include transform(scaleX(0.75));
  127. }
  128. &.active:after {
  129. top: 0;
  130. visibility: visible;
  131. @include transform(scaleX(0.75));
  132. }
  133. }
  134. &.active {
  135. a:after {
  136. top: 0;
  137. visibility: visible;
  138. @include transform(scaleX(0.75));
  139. }
  140. }
  141. /*Active dropdown nav item */
  142. ul {
  143. position: absolute;
  144. background-color: $dropdown-color;
  145. border: 1px solid darken($dropdown-color, 4%);
  146. border-top: 0;
  147. min-width: 12rem;
  148. text-align: left;
  149. z-index: 999;
  150. left: -1px;
  151. display: none;
  152. }
  153. ul li {
  154. display: block;
  155. float: none;
  156. /* Active Dropdown nav item */
  157. &.active > a {
  158. background-color: darken($dropdown-color, 4%);
  159. color: $core-accent;
  160. }
  161. &:hover > a {
  162. background-color: $core-accent;
  163. color: $white;
  164. }
  165. a {
  166. display: block;
  167. margin: 0 -1px;
  168. &:after, &:before {
  169. display: none;
  170. }
  171. }
  172. }
  173. /* Dropdown CSS */
  174. ul ul {
  175. left: 100%;
  176. top: 0px;
  177. }
  178. /* Active on Hover */
  179. &:hover > ul {
  180. display: block;
  181. }
  182. }
  183. @include breakpoint(desktop-only) {
  184. display: none;
  185. }
  186. }
  187. }
  188. .panel-activation {
  189. @extend %vertical-align;
  190. padding: 1rem;
  191. display: none;
  192. font-size: 1.8rem;
  193. cursor: pointer;
  194. float: right;
  195. @include breakpoint(desktop-only) {
  196. display: inline-block;
  197. }
  198. }
  199. }
  200. }
  201. // Header Image
  202. .header-image {
  203. &.fullwidth {
  204. #body {
  205. padding-left: 0;
  206. padding-right: 0;
  207. >.listing-row {
  208. padding-left: $padding-horiz;
  209. padding-right: $padding-horiz;
  210. }
  211. }
  212. }
  213. .listing-row:last-child {
  214. margin-bottom: 2rem;
  215. }
  216. #body {
  217. .flush-top {
  218. margin-top: - $header-height - $padding-vert - 1.5rem;
  219. padding-top: $header-height + 4rem;
  220. }
  221. }
  222. #breadcrumbs {
  223. margin-top: 1rem;
  224. }
  225. #header {
  226. background-color: rgba($header-text,0);
  227. box-shadow: none;
  228. .navigation .has-children:hover a {
  229. color: $core-accent;
  230. }
  231. #logo h3, #logo a {
  232. color: $header-text;
  233. }
  234. a, .menu-btn {
  235. color: $header-text;
  236. }
  237. a:before, a:after {
  238. background-color: rgba($header-text,0.7) !important;
  239. }
  240. }
  241. }