_header.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. @use 'sass:math';
  2. @use 'sass:color';
  3. .w-header {
  4. @apply w-text-primary w-mb-8;
  5. h1,
  6. h2 {
  7. @apply w-text-primary;
  8. margin: 0;
  9. }
  10. h1 {
  11. @apply w-h1;
  12. position: relative;
  13. }
  14. .w-header__glyph {
  15. position: absolute;
  16. inset-inline-start: -1.5em;
  17. vertical-align: text-top;
  18. &.icon {
  19. top: 0.125em;
  20. max-width: 1em;
  21. max-height: 1em;
  22. }
  23. &.avatar {
  24. inset-inline-start: -1.75em;
  25. }
  26. }
  27. .w-header__subtitle {
  28. margin-inline-start: 0.3125rem;
  29. font-weight: 400;
  30. }
  31. // Give padding to the rows inside of headers so that nested breadcrumbs aren't padded by their parent header el.
  32. // Use w-header--with-padding for headers that don't contain .row elements.
  33. &.w-header--with-padding,
  34. > .row {
  35. padding-top: 0.5rem;
  36. padding-bottom: 1.5rem;
  37. padding-inline-start: 110px;
  38. padding-inline-end: 20px;
  39. }
  40. &.w-header--merged .w-breadcrumb {
  41. padding-inline-start: $mobile-nav-indent;
  42. }
  43. .col {
  44. float: left;
  45. margin-inline-end: 2em;
  46. }
  47. .left {
  48. float: left;
  49. display: flex;
  50. align-items: center;
  51. flex-wrap: wrap;
  52. }
  53. .right {
  54. text-align: end;
  55. float: right;
  56. }
  57. .search-form .icon {
  58. @include svg-icon(1.2rem);
  59. color: theme('colors.primary.DEFAULT');
  60. position: absolute;
  61. top: 0;
  62. height: 100%;
  63. inset-inline-start: 0.7em;
  64. }
  65. // For case where content below header should merge with it
  66. &.w-header--merged {
  67. margin-bottom: 0;
  68. padding-bottom: 1rem;
  69. }
  70. &.w-header--no-border {
  71. border: 0;
  72. }
  73. &.w-header--merged.w-header--no-border {
  74. padding-bottom: 0;
  75. }
  76. .button {
  77. background-color: $color-teal-darker;
  78. &:hover {
  79. color: $color-white;
  80. background-color: $color-teal-dark;
  81. }
  82. }
  83. .button-secondary {
  84. color: $color-teal-darker;
  85. background-color: transparent;
  86. }
  87. label {
  88. @include visuallyhidden();
  89. }
  90. .error-message {
  91. color: inherit;
  92. }
  93. .fields {
  94. margin-top: -0.5em;
  95. li {
  96. padding-bottom: 0;
  97. }
  98. .field {
  99. padding: 0;
  100. }
  101. }
  102. .field-content {
  103. width: auto;
  104. padding: 0;
  105. }
  106. .last-updated {
  107. ul {
  108. padding: 0;
  109. }
  110. li {
  111. display: inline;
  112. margin-inline-end: 2em;
  113. }
  114. .avatar.small {
  115. margin-inline-start: 0;
  116. }
  117. a {
  118. font-weight: bold;
  119. }
  120. }
  121. }
  122. // Media for Windows High Contrast
  123. @media (forced-colors: $media-forced-colours) {
  124. .w-header .field-content {
  125. border: 0.1em solid $system-color-link-text;
  126. }
  127. }
  128. @include media-breakpoint-up(sm) {
  129. .w-header {
  130. .row {
  131. padding-top: 1.5rem;
  132. padding-inline-start: 90px;
  133. padding-inline-end: 90px;
  134. }
  135. &.w-header--merged .w-breadcrumb {
  136. padding-inline-start: 0;
  137. }
  138. .left {
  139. float: left;
  140. margin-inline-end: 0;
  141. &:first-child {
  142. padding-bottom: 0;
  143. float: left;
  144. }
  145. }
  146. .second {
  147. clear: none;
  148. .right,
  149. .left {
  150. float: right;
  151. }
  152. }
  153. .col3 {
  154. @include column(3);
  155. }
  156. .col3.actionbutton {
  157. width: auto;
  158. }
  159. .col6 {
  160. @include column(6);
  161. }
  162. .col9 {
  163. @include column(9);
  164. }
  165. }
  166. }