You are here

site-header.css in Drupal 9

Same filename and directory in other branches
  1. 10 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. .site-header {
  12. position: relative
  13. }
  14. @media (min-width: 75rem) {
  15. .site-header {
  16. /* Necessary to keep the content from jumping up when header transitions to fixed. */
  17. min-height: 11.25rem;
  18. border-bottom: solid 1px transparent /* Will show in Windows high contrast mode. */
  19. }
  20. }
  21. .site-header__initial {
  22. position: relative;
  23. z-index: 102;
  24. display: flex;
  25. align-items: flex-end;
  26. -ms-grid-row-align: stretch;
  27. align-self: stretch;
  28. background-color: #2494db;
  29. }
  30. .site-header__fixable {
  31. display: flex;
  32. align-items: flex-end;
  33. transition: all 0.5s
  34. }
  35. @media (min-width: 75rem) {
  36. .site-header__fixable.is-fixed:not(.is-expanded) {
  37. pointer-events: none;
  38. }
  39. }
  40. @media (min-width: 75rem) {
  41. body:not(.is-always-mobile-nav) .site-header__fixable.is-fixed {
  42. position: fixed;
  43. z-index: 102; /* Appear above body content that is position: relative */
  44. top: -4.5rem;
  45. max-width: 98.125rem;
  46. }
  47. body:not(.is-always-mobile-nav) {
  48. /* Toolbar is fixed, and tray is either vertical or closed and horizontal. */
  49. }
  50. body:not(.is-always-mobile-nav).toolbar-vertical.toolbar-fixed .site-header__fixable.is-fixed, body:not(.is-always-mobile-nav).toolbar-horizontal.toolbar-fixed .site-header__fixable.is-fixed {
  51. top: -2.0625rem;
  52. }
  53. body:not(.is-always-mobile-nav) {
  54. /* Toolbar is fixed, and tray is open and horizontal. */
  55. }
  56. body:not(.is-always-mobile-nav).toolbar-horizontal.toolbar-fixed.toolbar-tray-open .site-header__fixable.is-fixed {
  57. top: 0.4375rem;
  58. }
  59. }
  60. .site-header__inner {
  61. flex-grow: 1;
  62. width: calc(100vw - 5.625rem);
  63. background: #fff;
  64. }
  65. /*
  66. * Only apply transition styles when JS is loaded. This
  67. * works around https://bugs.chromium.org/p/chromium/issues/detail?id=332189
  68. */
  69. @media (min-width: 75rem) {
  70. html.js body:not(.is-always-mobile-nav) .site-header__inner {
  71. transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s
  72. }
  73. }
  74. @media (min-width: 75rem) {
  75. .site-header__fixable.is-expanded .site-header__inner {
  76. box-shadow: -36px 1px 36px rgba(0, 0, 0, 0.08) /* LTR */
  77. }
  78. }
  79. @media (min-width: 75rem) {
  80. [dir="rtl"] .site-header__fixable.is-expanded .site-header__inner {
  81. box-shadow: 36px 1px 36px rgba(0, 0, 0, 0.08)
  82. }
  83. }
  84. /* Hide the desktop nav when it's fixed and not active. */
  85. @media (min-width: 75rem) {
  86. body:not(.is-always-mobile-nav) .site-header__fixable.is-fixed:not(.is-expanded) .site-header__inner {
  87. transform: translateX(-101%); /* LTR */
  88. opacity: 0
  89. }
  90. }
  91. @media (min-width: 75rem) {
  92. [dir="rtl"] body:not(.is-always-mobile-nav) .site-header__fixable.is-fixed:not(.is-expanded) .site-header__inner {
  93. transform: translateX(101%)
  94. }
  95. }
  96. .site-header__inner__container {
  97. display: flex;
  98. justify-content: space-between;
  99. }