header-navigation.css

Same filename in other branches
  1. 9 core/themes/olivero/css/components/header-navigation.css
  2. 10 core/themes/olivero/css/components/header-navigation.css

Navigation in header.

File

core/themes/olivero/css/components/header-navigation.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Navigation in header.
  10. */
  11. .header-nav {
  12. position: fixed;
  13. z-index: 501; /* Appear above overlay and contextual links in header. */
  14. inset-block-start: 0;
  15. inset-inline-start: 100%;
  16. visibility: hidden;
  17. overflow: auto;
  18. /* Ensure that header nav not use additional space and force system branding
  19. * block text to unnecessarily wrap. */
  20. flex-basis: max-content;
  21. width: 100%;
  22. max-width: var(--mobile-nav-width);
  23. height: 100%;
  24. padding-block: 0 var(--sp);
  25. padding-inline-start: var(--sp);
  26. padding-inline-end: var(--sp);
  27. /* Create room for the "close" button. We cannot use margin because the
  28. * mobile navigation needs to slide beneath the button, but we also cannot
  29. * use padding because that would enable the button to scroll out of the
  30. * viewport on short screens. */
  31. border-block-start: solid var(--color--white) calc(var(--sp3) + var(--drupal-displace-offset-top, 0px));
  32. background-color: var(--color--white);
  33. box-shadow: 0 0 72px rgba(0, 0, 0, 0.1);
  34. }
  35. .header-nav.is-active {
  36. visibility: visible;
  37. transform: translateX(calc(-100% - var(--drupal-displace-offset-right, 0px))); /* LTR */
  38. }
  39. [dir="rtl"] .header-nav.is-active {
  40. transform: translateX(calc(100% + var(--drupal-displace-offset-left, 0px)));
  41. }
  42. @media (min-width: 31.25rem) {
  43. .header-nav {
  44. border-top-width: calc(var(--sp5) + var(--drupal-displace-offset-top, 0px));
  45. }
  46. }
  47. @media (min-width: 43.75rem) {
  48. .header-nav {
  49. padding-block-end: var(--sp3);
  50. padding-inline-start: var(--sp3);
  51. border-top-width: calc(var(--sp7) + var(--drupal-displace-offset-top, 0px));
  52. }
  53. }
  54. @media (min-width: 62.5rem) {
  55. .header-nav {
  56. grid-column: 5 / 14;
  57. }
  58. }
  59. /*
  60. * Ensure top border has the same color as the background when in forced colors.
  61. */
  62. @media (forced-colors: active) {
  63. .header-nav {
  64. border-top-color: canvas;
  65. }
  66. }
  67. /*
  68. * Only apply transition styles when JS is loaded. This
  69. * works around https://bugs.chromium.org/p/chromium/issues/detail?id=332189
  70. */
  71. html.js .header-nav {
  72. transition:
  73. visibility 0.2s,
  74. transform 0.2s;
  75. }
  76. @media (min-width: 75rem) {
  77. body:not(.is-always-mobile-nav) .header-nav {
  78. position: static;
  79. display: flex;
  80. visibility: visible;
  81. overflow: visible;
  82. grid-column: 5 / 15;
  83. align-items: center;
  84. justify-content: flex-end;
  85. max-width: none;
  86. height: var(--header-height-wide-when-fixed);
  87. margin-block-start: auto;
  88. padding-block: 0;
  89. padding-inline-start: 0;
  90. padding-inline-end: 0;
  91. transition: transform 0.2s;
  92. transform: none;
  93. border-block-start: 0;
  94. box-shadow: none;
  95. }
  96. }
  97. @media (min-width: 75rem) {
  98. body.is-always-mobile-nav .header-nav {
  99. overflow: auto;
  100. max-width: calc((7 * (var(--grid-col-width) + var(--grid-gap))));
  101. padding-inline-end: var(--sp);
  102. transition:
  103. transform 0.2s,
  104. visibility 0.2s;
  105. border-top-width: calc(var(--drupal-displace-offset-top, 0px) + var(--sp11));
  106. }
  107. }
  108. @media (min-width: 90rem) {
  109. body.is-always-mobile-nav .header-nav {
  110. max-width: calc(100vw - (var(--max-width) + var(--content-left)) + ((7 * (var(--grid-col-width) + var(--grid-gap)))));
  111. padding-inline-end: calc(100vw - (var(--max-width) + var(--content-left) - var(--sp)));
  112. }
  113. }
  114. .header-nav-overlay {
  115. position: fixed;
  116. z-index: 101;
  117. inset-block-start: 0;
  118. inset-inline-start: 0;
  119. display: none;
  120. width: 100%;
  121. height: 100vh;
  122. opacity: 0.2;
  123. background: var(--color--gray-5);
  124. }
  125. @media (forced-colors: active) {
  126. .header-nav-overlay {
  127. background: canvastext;
  128. }
  129. }
  130. .is-overlay-active .header-nav-overlay {
  131. display: block;
  132. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.