|
92 | 92 | } |
93 | 93 |
|
94 | 94 | /* products nav */ |
95 | | - wa-page > [slot='header'] { |
96 | | - /* reset default page component-based header styles */ |
97 | | - padding: 0; |
98 | | - gap: 0; |
| 95 | + .nav-products .product { |
| 96 | + border-radius: var(--wa-border-radius-s) var(--wa-border-radius-s) 0 0; |
| 97 | + line-height: 1; |
| 98 | + |
| 99 | + &.product-active { |
| 100 | + background-color: var(--wa-color-surface-default); |
| 101 | + /* nudge the non-first/second products to account for extra inline-start padding */ |
| 102 | + margin-inline-start: var(--nudge-inline-start, calc(var(--wa-form-control-padding-inline) * -1)); |
| 103 | + } |
| 104 | + } |
99 | 105 |
|
100 | | - container-type: inline-size; |
101 | | - container-name: header; |
| 106 | + /* full sized */ |
| 107 | + .wrapper-nav-products { |
| 108 | + background-color: var(--wa-color-surface-lowered); |
| 109 | + padding-block-start: var(--wa-space-xs); |
| 110 | + padding-inline: var(--content-padding-inline); |
| 111 | + inline-size: 100%; |
| 112 | + } |
102 | 113 |
|
103 | | - .wrapper-nav-products { |
104 | | - background-color: var(--wa-color-surface-lowered); |
105 | | - padding-block-start: var(--wa-space-xs); |
106 | | - padding-inline: var(--content-padding-inline); |
107 | | - inline-size: 100%; |
| 114 | + .nav-products-full { |
| 115 | + .product { |
| 116 | + padding-block: var(--wa-space-m); |
| 117 | + padding-inline: var(--wa-space-xl); |
| 118 | + |
| 119 | + /* nudge the non-first/second products to account for extra inline-start padding */ |
| 120 | + &:nth-child(n + 3) { |
| 121 | + margin-inline-start: calc(-1 * var(--wa-space-xl)); |
| 122 | + } |
108 | 123 | } |
109 | 124 |
|
110 | | - .nav-products { |
111 | | - .product { |
112 | | - padding-block: var(--wa-space-m); |
113 | | - padding-inline: var(--wa-space-xl); |
114 | | - border-radius: var(--wa-border-radius-s) var(--wa-border-radius-s) 0 0; |
115 | | - line-height: 1; |
| 125 | + .logo-icon { |
| 126 | + font-size: 1.5rem; /* ~ 24px to match .logo-svg height */ |
| 127 | + } |
116 | 128 |
|
117 | | - &.product-active { |
118 | | - background-color: var(--wa-color-surface-default); |
| 129 | + .logo-svg { |
| 130 | + width: auto; |
| 131 | + height: var(--awesome-logo-height, 1.5rem); |
| 132 | + } |
| 133 | + } |
119 | 134 |
|
120 | | - /* nudge the active product so that logo aligns with button labels in lower nav */ |
121 | | - margin-inline-start: calc(var(--wa-form-control-padding-inline) * -1); |
122 | | - } |
| 135 | + .nav-products-secondary .pseudo-product wa-icon { |
| 136 | + font-size: var(--wa-font-size-l); |
| 137 | + } |
123 | 138 |
|
124 | | - /* nudge the non-first/second products to account for extra inline-start padding */ |
125 | | - &:nth-child(n + 3) { |
126 | | - margin-inline-start: calc(-1 * var(--wa-space-xl)); |
127 | | - } |
128 | | - } |
| 139 | + /* drawer-based */ |
| 140 | + .nav-products-drawer { |
| 141 | + .product { |
| 142 | + /* match dimensions of drawer's close-button */ |
| 143 | + padding-inline: var(--wa-form-control-padding-inline); |
| 144 | + height: var(--wa-form-control-height); |
129 | 145 |
|
130 | | - .logo-icon { |
131 | | - font-size: 1.5rem; /* ~ 24px to match .logo-svg height */ |
| 146 | + &.product-active { |
| 147 | + --nudge-inline-start: calc(var(--wa-form-control-padding-inline) * -1.5); |
132 | 148 | } |
133 | 149 |
|
134 | | - .logo-svg { |
135 | | - width: auto; |
136 | | - height: var(--awesome-logo-height, 1.5rem); |
| 150 | + /* nudge the non-first/second products to account for extra inline-start padding */ |
| 151 | + &:nth-child(n + 4) { |
| 152 | + margin-inline-start: calc(-1 * var(--wa-form-control-padding-inline)); |
137 | 153 | } |
138 | 154 | } |
| 155 | + } |
139 | 156 |
|
140 | | - .nav-products-secondary .pseudo-product wa-icon { |
141 | | - font-size: var(--wa-font-size-l); |
142 | | - } |
| 157 | + /* header */ |
| 158 | + wa-page > [slot='header'] { |
| 159 | + /* reset default page component-based header styles */ |
| 160 | + padding: 0; |
| 161 | + gap: 0; |
| 162 | + container-type: inline-size; |
| 163 | + container-name: header; |
143 | 164 |
|
144 | 165 | @container header (inline-size <= 80ch) { |
145 | 166 | .header-nav, |
|
172 | 193 | --size: auto; |
173 | 194 | } |
174 | 195 |
|
| 196 | + /* drawer-based products nav */ |
| 197 | + wa-page::part(drawer__header) { |
| 198 | + background-color: var(--wa-color-surface-lowered); |
| 199 | + padding-block-start: 0; |
| 200 | + } |
| 201 | + |
| 202 | + wa-page::part(drawer__header-actions) { |
| 203 | + align-self: center; |
| 204 | + } |
| 205 | + |
| 206 | + wa-page > [slot='navigation-header'] { |
| 207 | + background-color: transparent; |
| 208 | + } |
| 209 | + |
175 | 210 | /* pro badge */ |
176 | 211 | wa-badge.pro { |
177 | 212 | color: var(--wa-color-brand-on-loud); |
|
0 commit comments