header-navigation.css

Same filename in other branches
  1. 10 core/themes/olivero/css/components/header-navigation.css
  2. 11.x 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. [dir="ltr"] .header-nav {
  12. left: 100%;
  13. }
  14. [dir="rtl"] .header-nav {
  15. right: 100%;
  16. }
  17. [dir="ltr"] .header-nav {
  18. padding-left: 1.125rem;
  19. }
  20. [dir="rtl"] .header-nav {
  21. padding-right: 1.125rem;
  22. }
  23. [dir="ltr"] .header-nav {
  24. padding-right: 1.125rem;
  25. }
  26. [dir="rtl"] .header-nav {
  27. padding-left: 1.125rem;
  28. }
  29. .header-nav {
  30. position: fixed;
  31. z-index: 501; /* Appear above overlay and contextual links in header. */
  32. top: 0;
  33. visibility: hidden;
  34. overflow: auto;
  35. /**
  36. * Ensure that header nav not use additional space and force system branding
  37. * block text to unnecessarily wrap.
  38. */
  39. flex-basis: 0;
  40. flex-grow: 1; /* Necessary for IE11. */
  41. width: 100%;
  42. max-width: 31.25rem;
  43. height: 100%;
  44. padding-top: 0;
  45. padding-bottom: 1.125rem;
  46. /**
  47. * Create room for the "close" button. We cannot use margin because The
  48. * mobile navigation needs to slide beneath the button, but we also cannot
  49. * use padding because that would enable the button to scroll out of the
  50. * viewport on short screens.
  51. */
  52. border-top: solid #fff 3.375rem;
  53. background-color: #fff;
  54. box-shadow: 0 0 72px rgba(0, 0, 0, 0.1);
  55. }
  56. .header-nav.is-active {
  57. visibility: visible;
  58. transform: translateX(-100%); /* LTR */
  59. }
  60. @supports (flex-basis: max-content) {
  61. .header-nav {
  62. flex-basis: max-content;
  63. }
  64. }
  65. @media (min-width: 31.25rem) {
  66. .header-nav {
  67. border-top-width: 90px;
  68. }
  69. }
  70. @media (min-width: 43.75rem) {
  71. [dir="ltr"] .header-nav {
  72. padding-left: 3.375rem;
  73. }
  74. [dir="rtl"] .header-nav {
  75. padding-right: 3.375rem;
  76. }
  77. .header-nav {
  78. padding-bottom: 3.375rem;
  79. border-top-width: 126px;
  80. }
  81. }
  82. @media (min-width: 62.5rem) {
  83. .header-nav {
  84. -ms-grid-column: 5;
  85. -ms-grid-column-span: 9;
  86. grid-column: 5 / 14;
  87. }
  88. }
  89. /*
  90. * Ensure top border has the same color as the background when in forced colors.
  91. */
  92. @media (forced-colors: active) {
  93. .header-nav {
  94. border-top-color: canvas;
  95. }
  96. }
  97. /*
  98. * Only apply transition styles when JS is loaded. This
  99. * works around https://bugs.chromium.org/p/chromium/issues/detail?id=332189
  100. */
  101. html.js .header-nav {
  102. transition: visibility 0.2s, transform 0.2s;
  103. }
  104. /* Toolbar is fixed, and tray is vertical. */
  105. body.toolbar-vertical .header-nav {
  106. border-top-width: 93px;
  107. }
  108. @media (min-width: 31.25rem) {
  109. body.toolbar-vertical .header-nav {
  110. border-top-width: 129px;
  111. }
  112. }
  113. /* Toolbar is fixed, and tray is vertical or toolbar is horizontal and tray is closed. */
  114. @media (min-width: 43.75rem) {
  115. body.toolbar-vertical .header-nav,
  116. body.toolbar-horizontal.toolbar-fixed .header-nav {
  117. border-top-width: 165px;
  118. }
  119. }
  120. /* Toolbar is horizontal fixed, and tray is open. */
  121. @media (min-width: 43.75rem) {
  122. body.toolbar-horizontal.toolbar-fixed.toolbar-tray-open .header-nav {
  123. border-top-width: 205px;
  124. }
  125. }
  126. @media (min-width: 75rem) {
  127. [dir="ltr"] body:not(.is-always-mobile-nav) .header-nav {
  128. padding-left: 0;
  129. }
  130. [dir="rtl"] body:not(.is-always-mobile-nav) .header-nav {
  131. padding-right: 0;
  132. }
  133. [dir="ltr"] body:not(.is-always-mobile-nav) .header-nav {
  134. padding-right: 0;
  135. }
  136. [dir="rtl"] body:not(.is-always-mobile-nav) .header-nav {
  137. padding-left: 0;
  138. }
  139. body:not(.is-always-mobile-nav) .header-nav {
  140. position: static;
  141. display: flex;
  142. visibility: visible;
  143. overflow: visible;
  144. -ms-grid-column: 5;
  145. -ms-grid-column-span: 10;
  146. grid-column: 5 / 15;
  147. align-items: center;
  148. justify-content: flex-end;
  149. max-width: none;
  150. height: 6.75rem;
  151. margin-top: auto;
  152. padding-top: 0;
  153. padding-bottom: 0;
  154. transition: transform 0.2s;
  155. transform: none;
  156. border-top: 0;
  157. box-shadow: none;
  158. }
  159. }
  160. /* Toolbar is fixed, and tray is vertical or toolbar is horizontal and tray is closed. */
  161. @media (min-width: 75rem) {
  162. body.is-always-mobile-nav.toolbar-vertical .header-nav,
  163. body.is-always-mobile-nav.toolbar-horizontal.toolbar-fixed .header-nav {
  164. border-top-width: 237px;
  165. }
  166. }
  167. /* Toolbar is horizontal fixed, and tray is open. */
  168. @media (min-width: 75rem) {
  169. body.is-always-mobile-nav.toolbar-horizontal.toolbar-fixed.toolbar-tray-open .header-nav {
  170. border-top-width: 277px;
  171. }
  172. }
  173. @media (min-width: 75rem) {
  174. [dir="ltr"] body.is-always-mobile-nav .header-nav {
  175. padding-right: 1.125rem;
  176. }
  177. [dir="rtl"] body.is-always-mobile-nav .header-nav {
  178. padding-left: 1.125rem;
  179. }
  180. body.is-always-mobile-nav .header-nav {
  181. overflow: auto;
  182. max-width: calc(50vw - 4.40625rem);
  183. transition: transform 0.2s, visibility 0.2s;
  184. border-top-width: 198px;
  185. }
  186. }
  187. @media (min-width: 90rem) {
  188. [dir="ltr"] body.is-always-mobile-nav .header-nav {
  189. padding-right: calc(100vw - 88.875rem);
  190. }
  191. [dir="rtl"] body.is-always-mobile-nav .header-nav {
  192. padding-left: calc(100vw - 88.875rem);
  193. }
  194. body.is-always-mobile-nav .header-nav {
  195. max-width: calc(100vw - 48.9375rem);
  196. }
  197. }
  198. [dir="rtl"] .header-nav.is-active {
  199. transform: translateX(100%);
  200. }
  201. [dir="ltr"] .header-nav-overlay {
  202. left: 0;
  203. }
  204. [dir="rtl"] .header-nav-overlay {
  205. right: 0;
  206. }
  207. .header-nav-overlay {
  208. position: fixed;
  209. z-index: 101;
  210. top: 0;
  211. display: none;
  212. width: 100%;
  213. height: 100vh;
  214. opacity: 0.2;
  215. background: #0d77b5;
  216. }
  217. @media (forced-colors: active) {
  218. .header-nav-overlay {
  219. background: canvastext;
  220. }
  221. }
  222. .is-overlay-active .header-nav-overlay {
  223. display: block;
  224. }

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