header-site-branding.pcss.css

Same filename in other branches
  1. 10 core/themes/olivero/css/components/header-site-branding.pcss.css
  2. 11.x core/themes/olivero/css/components/header-site-branding.pcss.css

Site branding in header.

File

core/themes/olivero/css/components/header-site-branding.pcss.css

View source
  1. /**
  2. * @file
  3. * Site branding in header.
  4. */
  5. @import "../base/variables.pcss.css";
  6. .site-branding {
  7. display: flex;
  8. flex-shrink: 1;
  9. align-items: flex-end;
  10. min-width: calc((2 * var(--grid-col-width)) + (2 * var(--grid-gap)) + var(--container-padding));
  11. min-height: var(--sp3);
  12. margin-inline: calc(-1 * var(--container-padding)) var(--sp);
  13. padding-block: 0 var(--sp0-5);
  14. padding-inline-start: var(--container-padding);
  15. padding-inline-end: var(--container-padding);
  16. /* @todo - #0d7ab8 isn't currently a variable. */
  17. background-image: linear-gradient(160deg, var(--color--blue-50) 0%, #0d7ab8 78.66%);
  18. @media (--sm) {
  19. min-height: var(--sp4);
  20. }
  21. @media (--md) {
  22. min-height: var(--sp6);
  23. padding-block-end: var(--sp);
  24. }
  25. @media (--lg) {
  26. min-width: calc((2 * var(--grid-col-width--lg)) + (2 * var(--grid-gap--lg)) + var(--container-padding));
  27. }
  28. @media (--nav) {
  29. min-width: calc((2 * var(--grid-col-width--nav)) + (2 * var(--grid-gap--nav)) + var(--container-padding-nav));
  30. min-height: var(--site-header-height-wide);
  31. margin-inline-start: calc(-1 * var(--container-padding-nav));
  32. padding-block: 0;
  33. padding-inline-start: var(--container-padding-nav);
  34. padding-inline-end: var(--container-padding-nav);
  35. }
  36. @media (--grid-max) {
  37. min-width: calc((2 * var(--grid-col-width--max)) + (2 * var(--grid-gap--max)) + var(--container-padding-nav));
  38. }
  39. }
  40. [dir="rtl"] .site-branding {
  41. background-image: linear-gradient(-160deg, var(--color--blue-50) 0%, #0d7ab8 78.66%);
  42. }
  43. .site-branding--bg-gray {
  44. background: var(--color--gray-95);
  45. }
  46. .site-branding--bg-white {
  47. background: var(--color--white);
  48. }
  49. .site-branding__inner {
  50. display: flex;
  51. align-items: center;
  52. & a {
  53. text-decoration: none;
  54. }
  55. @media (--nav) {
  56. height: var(--header-height-wide-when-fixed);
  57. padding-block: var(--sp0-5);
  58. padding-inline-start: 0;
  59. padding-inline-end: 0;
  60. }
  61. }
  62. .site-branding__logo {
  63. flex-shrink: 0;
  64. max-width: 100%;
  65. & img {
  66. width: auto;
  67. max-width: 100%;
  68. max-height: var(--sp2);
  69. @media (--sm) {
  70. max-height: var(--sp3);
  71. }
  72. @media (--md) {
  73. max-height: var(--sp4);
  74. }
  75. @media (--nav) {
  76. max-height: calc(var(--header-height-wide-when-fixed) - var(--sp));
  77. }
  78. }
  79. }
  80. .site-branding__text {
  81. color: var(--color--white);
  82. font-size: 18px;
  83. font-weight: bold;
  84. & a {
  85. color: inherit;
  86. }
  87. @media (--md) {
  88. font-size: 28px;
  89. line-height: 28px;
  90. }
  91. @media (--nav) {
  92. letter-spacing: 0.02em;
  93. font-size: 32px;
  94. line-height: var(--sp2);
  95. }
  96. }
  97. .site-branding--bg-gray .site-branding__text,
  98. .site-branding--bg-white .site-branding__text {
  99. color: var(--color--blue-50);
  100. }
  101. .site-branding__logo + .site-branding__text {
  102. margin-inline-start: 12px;
  103. }

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