_site-header.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. // Site header
  2. .site-header {
  3. padding: 1em;
  4. &.featured-image {
  5. display: flex;
  6. flex-direction: column;
  7. justify-content: space-between;
  8. min-height: 90vh;
  9. .site-branding-container {
  10. margin-bottom: auto;
  11. }
  12. }
  13. @include media(tablet) {
  14. margin: 0;
  15. padding: 3rem 0;
  16. &.featured-image {
  17. min-height: 100vh;
  18. margin-bottom: 3rem;
  19. }
  20. }
  21. }
  22. // Site branding
  23. .site-branding {
  24. color: $color__text-light;
  25. -webkit-hyphens: auto;
  26. -moz-hyphens: auto;
  27. -ms-hyphens: auto;
  28. hyphens: auto;
  29. position: relative;
  30. word-wrap: break-word;
  31. @include media(tablet) {
  32. margin: 0 $size__site-margins;
  33. }
  34. }
  35. // Site logo
  36. .site-logo {
  37. position: relative;
  38. z-index: 999;
  39. margin-bottom: calc(.66 * #{$size__spacing-unit});
  40. @include media(tablet) {
  41. margin-bottom: 0;
  42. position: absolute;
  43. right: calc(100% + (1.25 * #{$size__spacing-unit}));
  44. top: 4px; // Accounts for box-shadow widths
  45. z-index: 999;
  46. }
  47. .custom-logo-link {
  48. border-radius: 100%;
  49. box-sizing: content-box;
  50. box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  51. display: block;
  52. width: 50px;
  53. height: 50px;
  54. overflow: hidden;
  55. transition: box-shadow $background_transition ease-in-out;
  56. .custom-logo {
  57. min-height: inherit;
  58. }
  59. &:hover,
  60. &:active,
  61. &:focus {
  62. box-shadow: 0 0 0 2px rgba(0, 0, 0, 1);
  63. }
  64. @include media(tablet) {
  65. width: 64px;
  66. height: 64px;
  67. }
  68. }
  69. }
  70. // Site title
  71. .site-title {
  72. margin: auto;
  73. display: inline;
  74. color: $color__text-main;
  75. a {
  76. color: $color__text-main;
  77. &:link,
  78. &:visited {
  79. color: $color__text-main;
  80. }
  81. &:hover {
  82. color: $color__text-hover;
  83. }
  84. }
  85. .featured-image & {
  86. margin: 0;
  87. @include media(tablet) {
  88. display: inline-block;
  89. }
  90. }
  91. /* When there is no description set, make sure navigation appears below title. */
  92. + .main-navigation {
  93. display: block;
  94. }
  95. @include media(tablet) {
  96. display: inline;
  97. }
  98. &:not(:empty) + .site-description:not(:empty):before {
  99. content: "\2014";
  100. margin: 0 .2em;
  101. }
  102. }
  103. // Site description
  104. .site-description {
  105. display: inline;
  106. color: $color__text-light;
  107. font-weight: normal;
  108. margin: 0;
  109. }