|
117 | 117 | <style> |
118 | 118 | nav { |
119 | 119 | width: 100%; |
120 | | - overflow-x: hidden; |
| 120 | + overflow-x: auto; |
| 121 | + -webkit-overflow-scrolling: touch; |
121 | 122 | position: sticky; |
122 | 123 | top: 0; |
123 | 124 | display: flex; |
124 | 125 | flex-direction: row; |
125 | | - overflow: hidden; |
126 | 126 | min-height: 5rem; |
| 127 | + height: auto; |
127 | 128 | pointer-events: auto; |
128 | 129 | cursor: pointer; |
129 | 130 | z-index: 1000; |
130 | | - background: rgba(24,26,31,0.98); |
| 131 | + background: rgba(24,26,31,1); |
131 | 132 | border-bottom: 1px solid var(--wine-dark-gray); |
| 133 | + scrollbar-width: none; /* Firefox */ |
| 134 | + -ms-overflow-style: none; /* IE and Edge */ |
| 135 | + } |
| 136 | +
|
| 137 | + /* Hide scrollbar for Chrome, Safari and Opera */ |
| 138 | + nav::-webkit-scrollbar { |
| 139 | + display: none; |
132 | 140 | } |
133 | 141 |
|
134 | 142 | .agent-group { |
|
198 | 206 | transition: all var(--250ms); |
199 | 207 | } |
200 | 208 |
|
| 209 | + /* Flex spacers for centering when content fits */ |
| 210 | + nav::before, |
| 211 | + nav::after { |
| 212 | + content: ""; |
| 213 | + flex: 1 0 0; |
| 214 | + } |
| 215 | +
|
| 216 | + .agent-group { |
| 217 | + flex: 0 0 auto; /* don't stretch cards */ |
| 218 | + scroll-snap-align: center; /* snap each card to center */ |
| 219 | + } |
| 220 | +
|
201 | 221 | @media (max-width: 700px) { |
| 222 | + nav { |
| 223 | + min-height: 4rem; |
| 224 | + justify-content: flex-start; /* Remove centering on mobile to avoid white space */ |
| 225 | + } |
| 226 | +
|
| 227 | + /* Remove flex spacers on mobile */ |
| 228 | + nav::before, |
| 229 | + nav::after { |
| 230 | + display: none; |
| 231 | + } |
| 232 | +
|
202 | 233 | .agent-group { |
203 | 234 | min-width: 100px; |
| 235 | + margin: 0 0.5rem; |
| 236 | + padding: 1rem 0 0.75rem 0; |
204 | 237 | } |
205 | 238 |
|
206 | 239 | .label-wrapper { |
|
217 | 250 | transition: all var(--250ms); |
218 | 251 | } |
219 | 252 | } |
220 | | - nav { |
221 | | - /* existing styles ... */ |
222 | | - display: flex; |
223 | | - justify-content: center; /* center when content fits */ |
224 | | - scroll-snap-type: x mandatory; /* optional: nice snap feel */ |
225 | | - } |
226 | | -
|
227 | | - /* invisible flex spacers so content is centered when it doesn't overflow */ |
228 | | - nav::before, |
229 | | - nav::after { |
230 | | - content: ""; |
231 | | - flex: 1 0 0; |
232 | | - } |
233 | | -
|
234 | | - .agent-group { |
235 | | - flex: 0 0 auto; /* don't stretch cards */ |
236 | | - scroll-snap-align: center; /* optional: snap each card to center */ |
237 | | - } |
238 | 253 |
|
239 | 254 | </style> |
0 commit comments