_header.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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-breadcrumb {
  46. padding-inline-start: $mobile-nav-indent;
  47. }
  48. .col {
  49. float: left;
  50. margin-inline-end: 2em;
  51. }
  52. .left {
  53. float: left;
  54. display: flex;
  55. align-items: center;
  56. flex-wrap: wrap;
  57. }
  58. .right {
  59. text-align: end;
  60. float: right;
  61. }
  62. // For case where content below header should merge with it
  63. &.w-header--merged {
  64. margin-bottom: 0;
  65. padding-bottom: theme('spacing.1');
  66. }
  67. &.w-header--no-border {
  68. border: 0;
  69. }
  70. &.w-header--merged.w-header--no-border {
  71. padding-bottom: 0;
  72. }
  73. .error-message {
  74. color: inherit;
  75. }
  76. .last-updated {
  77. ul {
  78. padding: 0;
  79. }
  80. li {
  81. display: inline;
  82. margin-inline-end: 2em;
  83. }
  84. .avatar.small {
  85. margin-inline-start: 0;
  86. }
  87. a {
  88. font-weight: theme('fontWeight.bold');
  89. }
  90. }
  91. }
  92. @include media-breakpoint-up(sm) {
  93. .w-header {
  94. .row {
  95. padding-inline-start: $desktop-nice-padding;
  96. padding-inline-end: $desktop-nice-padding;
  97. padding-top: theme('spacing.10');
  98. }
  99. &.w-header--merged .w-breadcrumb {
  100. padding-inline-start: 0;
  101. }
  102. .w-header__glyph {
  103. &.avatar {
  104. margin-inline-start: calc(0 - theme('spacing.9'));
  105. }
  106. }
  107. .left {
  108. float: left;
  109. margin-inline-end: 0;
  110. &:first-child {
  111. padding-bottom: 0;
  112. float: left;
  113. }
  114. }
  115. .second {
  116. clear: none;
  117. .right,
  118. .left {
  119. float: right;
  120. }
  121. }
  122. .col3 {
  123. @include column(3);
  124. }
  125. .col3.actionbutton {
  126. width: auto;
  127. }
  128. .col6 {
  129. @include column(6);
  130. }
  131. .col9 {
  132. @include column(9);
  133. }
  134. }
  135. }