You are here

header-navigation.css in Drupal 10

Same filename and directory in other branches
  1. 9 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. /*
  12. * Media query breakpoints.
  13. * Processed by postcss/postcss-custom-media.
  14. */
  15. /* Navigation related breakpoints */
  16. /* Grid related breakpoints */
  17. /* Grid shifts from 6 to 14 columns. */
  18. /* Width of the entire grid maxes out. */
  19. [dir="ltr"] .header-nav {
  20. left: 100%
  21. }
  22. [dir="rtl"] .header-nav {
  23. right: 100%
  24. }
  25. [dir="ltr"] .header-nav {
  26. padding-left: var(--sp)
  27. }
  28. [dir="rtl"] .header-nav {
  29. padding-right: var(--sp)
  30. }
  31. [dir="ltr"] .header-nav {
  32. padding-right: var(--sp)
  33. }
  34. [dir="rtl"] .header-nav {
  35. padding-left: var(--sp)
  36. }
  37. .header-nav {
  38. position: fixed;
  39. z-index: 501; /* Appear above overlay and contextual links in header. */
  40. top: 0;
  41. visibility: hidden;
  42. overflow: auto;
  43. /* Ensure that header nav not use additional space and force system branding
  44. * block text to unnecessarily wrap. */
  45. flex-basis: max-content;
  46. width: 100%;
  47. max-width: var(--mobile-nav-width);
  48. height: 100%;
  49. padding-top: 0;
  50. padding-bottom: var(--sp);
  51. /* Create room for the "close" button. We cannot use margin because the
  52. * mobile navigation needs to slide beneath the button, but we also cannot
  53. * use padding because that would enable the button to scroll out of the
  54. * viewport on short screens. */
  55. border-top: solid var(--color--white) calc(var(--sp3) + var(--drupal-displace-offset-top, 0px));
  56. background-color: var(--color--white);
  57. box-shadow: 0 0 72px rgba(0, 0, 0, 0.1)
  58. }
  59. .header-nav.is-active {
  60. visibility: visible;
  61. transform: translateX(-100%) /* LTR */
  62. }
  63. [dir="rtl"] .header-nav.is-active {
  64. transform: translateX(100%);
  65. }
  66. @media (min-width: 31.25rem) {
  67. .header-nav {
  68. border-top-width: calc(var(--sp5) + var(--drupal-displace-offset-top, 0px))
  69. }
  70. }
  71. @media (min-width: 43.75rem) {
  72. [dir="ltr"] .header-nav {
  73. padding-left: var(--sp3)
  74. }
  75. [dir="rtl"] .header-nav {
  76. padding-right: var(--sp3)
  77. }
  78. .header-nav {
  79. padding-bottom: var(--sp3);
  80. border-top-width: calc(var(--sp7) + var(--drupal-displace-offset-top, 0px))
  81. }
  82. }
  83. @media (min-width: 62.5rem) {
  84. .header-nav {
  85. grid-column: 5 / 14
  86. }
  87. }
  88. .header-nav {
  89. /*
  90. * Ensure top border has the same color as the background when in forced colors.
  91. */
  92. }
  93. @media (forced-colors: active) {
  94. .header-nav {
  95. border-top-color: canvas
  96. }
  97. }
  98. /*
  99. * Only apply transition styles when JS is loaded. This
  100. * works around https://bugs.chromium.org/p/chromium/issues/detail?id=332189
  101. */
  102. html.js .header-nav {
  103. transition: visibility 0.2s, transform 0.2s;
  104. }
  105. @media (min-width: 75rem) {
  106. [dir="ltr"] body:not(.is-always-mobile-nav) .header-nav {
  107. padding-left: 0
  108. }
  109. [dir="rtl"] body:not(.is-always-mobile-nav) .header-nav {
  110. padding-right: 0
  111. }
  112. [dir="ltr"] body:not(.is-always-mobile-nav) .header-nav {
  113. padding-right: 0
  114. }
  115. [dir="rtl"] body:not(.is-always-mobile-nav) .header-nav {
  116. padding-left: 0
  117. }
  118. body:not(.is-always-mobile-nav) .header-nav {
  119. position: static;
  120. display: flex;
  121. visibility: visible;
  122. overflow: visible;
  123. grid-column: 5 / 15;
  124. align-items: center;
  125. justify-content: flex-end;
  126. max-width: none;
  127. height: var(--header-height-wide-when-fixed);
  128. margin-top: auto;
  129. padding-top: 0;
  130. padding-bottom: 0;
  131. transition: transform 0.2s;
  132. transform: none;
  133. border-top: 0;
  134. box-shadow: none
  135. }
  136. }
  137. @media (min-width: 75rem) {
  138. [dir="ltr"] body.is-always-mobile-nav .header-nav {
  139. padding-right: var(--sp)
  140. }
  141. [dir="rtl"] body.is-always-mobile-nav .header-nav {
  142. padding-left: var(--sp)
  143. }
  144. body.is-always-mobile-nav .header-nav {
  145. overflow: auto;
  146. max-width: calc((7 * (var(--grid-col-width) + var(--grid-gap))));
  147. transition: transform 0.2s, visibility 0.2s;
  148. border-top-width: calc(var(--drupal-displace-offset-top, 0px) + var(--sp11))
  149. }
  150. }
  151. @media (min-width: 90rem) {
  152. [dir="ltr"] body.is-always-mobile-nav .header-nav {
  153. padding-right: calc(100vw - (var(--max-width) + var(--content-left) - var(--sp)))
  154. }
  155. [dir="rtl"] body.is-always-mobile-nav .header-nav {
  156. padding-left: calc(100vw - (var(--max-width) + var(--content-left) - var(--sp)))
  157. }
  158. body.is-always-mobile-nav .header-nav {
  159. max-width: calc(100vw - (var(--max-width) + var(--content-left)) + ((7 * (var(--grid-col-width) + var(--grid-gap)))))
  160. }
  161. }
  162. [dir="ltr"] .header-nav-overlay {
  163. left: 0
  164. }
  165. [dir="rtl"] .header-nav-overlay {
  166. right: 0
  167. }
  168. .header-nav-overlay {
  169. position: fixed;
  170. z-index: 101;
  171. top: 0;
  172. display: none;
  173. width: 100%;
  174. height: 100vh;
  175. opacity: 0.2;
  176. background: var(--color--gray-5)
  177. }
  178. @media (forced-colors: active) {
  179. .header-nav-overlay {
  180. background: canvastext
  181. }
  182. }
  183. .is-overlay-active .header-nav-overlay {
  184. display: block
  185. }