You are here

site-header.css in Drupal 10

Same filename and directory in other branches
  1. 9 core/themes/olivero/css/components/site-header.css

Site header.

File

core/themes/olivero/css/components/site-header.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. * Site 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. .site-header {
  20. position: relative;
  21. /**
  22. * Ensure mobile site header is always above other elements including
  23. * contextual links, quick-edit, and Tour.
  24. */
  25. z-index: 101
  26. }
  27. @media (min-width: 75rem) {
  28. .site-header {
  29. /* Necessary to keep the content from jumping up when header transitions to fixed. */
  30. min-height: var(--site-header-height-wide);
  31. border-bottom: solid 1px transparent /* Will show in Windows high contrast mode. */
  32. }
  33. }
  34. .site-header__initial {
  35. position: relative;
  36. z-index: 102;
  37. display: flex;
  38. align-items: flex-end;
  39. align-self: stretch;
  40. background-color: var(--color--primary-50);
  41. }
  42. .site-header__fixable {
  43. display: flex;
  44. align-items: flex-end;
  45. transition: all 0.5s
  46. }
  47. @media (min-width: 75rem) {
  48. .site-header__fixable.is-fixed:not(.is-expanded) {
  49. pointer-events: none;
  50. }
  51. }
  52. @media (min-width: 75rem) {
  53. body:not(.is-always-mobile-nav) .site-header__fixable.is-fixed {
  54. position: fixed;
  55. z-index: 102; /* Appear above body content that is position: relative */
  56. top: calc(var(--drupal-displace-offset-top, 0px) - var(--sp4));
  57. max-width: var(--max-bg-color);
  58. }
  59. }
  60. .site-header__inner {
  61. z-index: 1; /* Appear in front of Drupal's tabs. */
  62. flex-grow: 1;
  63. width: calc(100vw - var(--content-left) - var(--drupal-displace-offset-left, 0px) - var(--drupal-displace-offset-right, 0px));
  64. background: var(--color--white);
  65. }
  66. /*
  67. * Only apply transition styles when JS is loaded. This
  68. * works around https://bugs.chromium.org/p/chromium/issues/detail?id=332189
  69. */
  70. @media (min-width: 75rem) {
  71. html.js body:not(.is-always-mobile-nav) .site-header__inner {
  72. transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s
  73. }
  74. }
  75. @media (min-width: 75rem) {
  76. .site-header__fixable.is-expanded .site-header__inner {
  77. box-shadow: -36px 1px 36px rgba(0, 0, 0, 0.08) /* LTR */
  78. }
  79. }
  80. @media (min-width: 75rem) {
  81. [dir="rtl"] .site-header__fixable.is-expanded .site-header__inner {
  82. box-shadow: 36px 1px 36px rgba(0, 0, 0, 0.08)
  83. }
  84. }
  85. /* Hide the desktop nav when it's fixed and not active. */
  86. @media (min-width: 75rem) {
  87. body:not(.is-always-mobile-nav) .site-header__fixable.is-fixed:not(.is-expanded) .site-header__inner {
  88. transform: translateX(-101%); /* LTR */
  89. opacity: 0
  90. }
  91. }
  92. @media (min-width: 75rem) {
  93. [dir="rtl"] body:not(.is-always-mobile-nav) .site-header__fixable.is-fixed:not(.is-expanded) .site-header__inner {
  94. transform: translateX(101%)
  95. }
  96. }
  97. .site-header__inner__container {
  98. display: flex;
  99. justify-content: space-between;
  100. }