_header.scss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. @use 'sass:math';
  2. @use 'sass:color';
  3. .w-header {
  4. @apply w-text-text-label;
  5. margin-bottom: theme('spacing.8');
  6. h1,
  7. h2 {
  8. @apply w-text-text-label;
  9. margin: 0;
  10. }
  11. h1 {
  12. @apply w-h1;
  13. position: relative;
  14. }
  15. .w-header__glyph {
  16. position: absolute;
  17. inset-inline-start: calc(0 - theme('spacing.11'));
  18. vertical-align: text-top;
  19. &.icon {
  20. top: 0.125em;
  21. max-width: 1em;
  22. max-height: 1em;
  23. }
  24. &.avatar {
  25. margin-inline-start: calc(0 - theme('spacing.2'));
  26. }
  27. }
  28. .w-header__subtitle {
  29. margin-inline-start: theme('spacing[1.5]');
  30. font-weight: theme('fontWeight.normal');
  31. }
  32. .w-header__description {
  33. font-size: theme('fontSize.18');
  34. font-weight: theme('fontWeight.normal');
  35. }
  36. // Give padding to the rows inside of headers so that nested breadcrumbs aren't padded by their parent header el.
  37. // Use w-header--with-padding for headers that don't contain .row elements.
  38. &.w-header--with-padding,
  39. > .row {
  40. padding-top: theme('spacing.2');
  41. padding-bottom: theme('spacing.[2.5]');
  42. padding-inline-start: 110px;
  43. padding-inline-end: theme('spacing.5');
  44. }
  45. &.w-header--merged .w-breadcrumbs {
  46. padding-inline-start: $mobile-nav-indent;
  47. }
  48. .col {
  49. float: inline-start;
  50. margin-inline-end: 2em;
  51. }
  52. .left {
  53. float: inline-start;
  54. display: flex;
  55. align-items: center;
  56. flex-wrap: wrap;
  57. }
  58. .right {
  59. display: flex;
  60. gap: theme('spacing[2.5]');
  61. text-align: end;
  62. float: inline-end;
  63. }
  64. // For case where content below header should merge with it
  65. &.w-header--merged {
  66. margin-bottom: 0;
  67. padding-bottom: theme('spacing.1');
  68. }
  69. &.w-header--no-border {
  70. border: 0;
  71. }
  72. &.w-header--merged.w-header--no-border {
  73. padding-bottom: 0;
  74. }
  75. .error-message {
  76. color: inherit;
  77. }
  78. .last-updated {
  79. ul {
  80. padding: 0;
  81. }
  82. li {
  83. display: inline;
  84. margin-inline-end: 2em;
  85. }
  86. .avatar.small {
  87. margin-inline-start: 0;
  88. }
  89. a {
  90. font-weight: theme('fontWeight.bold');
  91. }
  92. }
  93. }
  94. @include media-breakpoint-up(sm) {
  95. .w-header {
  96. .row {
  97. padding-inline-start: $desktop-nice-padding;
  98. padding-inline-end: $desktop-nice-padding;
  99. padding-top: theme('spacing.10');
  100. }
  101. &.w-header--merged .w-breadcrumbs {
  102. padding-inline-start: 0;
  103. }
  104. .w-header__glyph {
  105. &.avatar {
  106. margin-inline-start: calc(0 - theme('spacing.9'));
  107. }
  108. }
  109. .left {
  110. float: inline-start;
  111. margin-inline-end: 0;
  112. &:first-child {
  113. padding-bottom: 0;
  114. float: inline-start;
  115. }
  116. }
  117. .second {
  118. clear: none;
  119. .right,
  120. .left {
  121. float: inline-end;
  122. }
  123. }
  124. .col3 {
  125. @include column(3);
  126. }
  127. .col3.actionbutton {
  128. width: auto;
  129. }
  130. .col6 {
  131. @include column(6);
  132. }
  133. .col9 {
  134. @include column(9);
  135. }
  136. }
  137. }