|
8 | 8 |
|
9 | 9 | .ams-header {
|
10 | 10 | /*
|
11 |
| - * The branding section is created twice: once outside the navigation and once hidden inside it. |
12 |
| - * This keeps all navigation in one nav element and lets the menu wrap around the branding section. |
13 |
| - * Display grid is used to let both branding sections overlap. |
| 11 | + * The logo link section is created twice: once outside the navigation and once hidden inside it. |
| 12 | + * This keeps all navigation in one nav element and lets the menu wrap around the logo link section. |
| 13 | + * Display grid is used to let both logo link sections overlap. |
14 | 14 | */
|
15 | 15 | display: grid;
|
| 16 | + font-family: var(--ams-header-font-family); |
16 | 17 | padding-block: var(--ams-header-padding-block);
|
17 | 18 | padding-inline: var(--ams-header-padding-inline);
|
18 | 19 | }
|
19 | 20 |
|
20 |
| -.ams-header__branding { |
| 21 | +.ams-header__logo-link { |
21 | 22 | align-items: center;
|
22 |
| - align-self: start; // To align the branding section to the top of the header when it wraps |
23 |
| - column-gap: var(--ams-header-branding-column-gap); |
| 23 | + align-self: start; // To align the logo link section to the top of the header when it wraps |
| 24 | + column-gap: var(--ams-header-logo-link-column-gap); |
24 | 25 | display: flex;
|
25 |
| - grid-area: 1 / 1; // To allow this section to overlap with the second branding section |
| 26 | + grid-area: 1 / 1; // To allow this section to overlap with the second logo link section |
| 27 | + inline-size: fit-content; |
| 28 | + outline-offset: var(--ams-header-logo-link-outline-offset); |
| 29 | + text-decoration: none; |
26 | 30 | }
|
27 | 31 |
|
28 |
| -.ams-header__branding--hidden { |
| 32 | +.ams-header__logo-link--hidden { |
29 | 33 | opacity: 0%;
|
30 |
| - user-select: none; // The hidden branding section should not be selectable |
| 34 | + user-select: none; // The hidden logo link section should not be selectable |
31 | 35 | }
|
32 | 36 |
|
33 |
| -.ams-header__logo-link { |
34 |
| - outline-offset: var(--ams-header-logo-link-outline-offset); |
| 37 | +.ams-header__logo-container { |
| 38 | + flex-shrink: 0; |
| 39 | + inline-size: 0.75rem; |
| 40 | + overflow: hidden; |
| 41 | + |
| 42 | + @media screen and (min-width: $ams-breakpoint-medium) { |
| 43 | + inline-size: auto; |
| 44 | + } |
35 | 45 | }
|
36 | 46 |
|
37 |
| -/* TODO Remove after updating Heading line heights in DES-973. */ |
38 |
| -.ams-heading.ams-header__brand-name { |
| 47 | +.ams-header__brand-name { |
| 48 | + color: var(--ams-header-brand-name-color); |
| 49 | + font-size: var(--ams-header-brand-name-font-size); |
| 50 | + font-weight: var(--ams-header-brand-name-font-weight); |
39 | 51 | line-height: 1.35;
|
40 | 52 | }
|
41 | 53 |
|
42 | 54 | .ams-header__navigation {
|
43 | 55 | column-gap: var(--ams-header-navigation-column-gap);
|
44 | 56 | display: flex;
|
45 | 57 | flex-wrap: wrap;
|
46 |
| - grid-area: 1 / 1; // To allow this section to overlap with the branding section |
47 |
| - // This section blocks pointer events initially, so the hidden branding section can't be activated. |
| 58 | + grid-area: 1 / 1; // To allow this section to overlap with the logo link section |
| 59 | + // This section blocks pointer events initially, so the hidden logo link section can't be activated. |
48 | 60 | // The menu and collapsible menu set it back to auto, to make sure they can be activated.
|
49 | 61 | pointer-events: none;
|
50 | 62 | row-gap: var(--ams-header-navigation-row-gap);
|
|
83 | 95 |
|
84 | 96 | @mixin header-menu-action {
|
85 | 97 | color: var(--ams-header-menu-item-color);
|
86 |
| - font-family: var(--ams-header-menu-item-font-family); |
87 | 98 | font-size: var(--ams-header-menu-item-font-size);
|
88 | 99 | font-weight: var(--ams-header-menu-item-font-weight);
|
89 | 100 | line-height: var(--ams-header-menu-item-line-height);
|
|
132 | 143 | column-gap: var(--ams-header-menu-item-column-gap);
|
133 | 144 | cursor: var(--ams-header-mega-menu-button-cursor);
|
134 | 145 | display: grid;
|
| 146 | + font-family: inherit; |
135 | 147 | grid-auto-flow: column;
|
136 | 148 |
|
137 | 149 | @include header-menu-action;
|
|
0 commit comments