|
312 | 312 | Connection Banner (gateway offline / reconnecting) |
313 | 313 | =========================================== */ |
314 | 314 |
|
| 315 | +/* Fixed overlay lane under the topbar: connection flaps must not reflow the |
| 316 | + page the way the old in-flow banner did, so the pill floats over content. */ |
315 | 317 | .connection-banner { |
316 | | - position: sticky; |
317 | | - top: 0; |
318 | | - z-index: 11; |
| 318 | + position: fixed; |
| 319 | + top: calc(var(--shell-topbar-height, 44px) + 10px); |
| 320 | + left: var(--shell-nav-width, 0px); |
| 321 | + right: 0; |
| 322 | + /* Above content, below the mobile nav drawer/backdrop (65+). */ |
| 323 | + z-index: 50; |
319 | 324 | display: flex; |
320 | | - align-items: center; |
321 | 325 | justify-content: center; |
| 326 | + padding: 0 16px; |
| 327 | + pointer-events: none; |
| 328 | +} |
| 329 | + |
| 330 | +.connection-banner__pill { |
| 331 | + pointer-events: auto; |
| 332 | + display: inline-flex; |
| 333 | + align-items: center; |
322 | 334 | gap: 10px; |
323 | | - flex-wrap: wrap; |
324 | | - margin: 0 calc(-1 * var(--shell-pad)) 0; |
325 | | - border-radius: 0; |
326 | | - border-left: none; |
327 | | - border-right: none; |
328 | | - font-weight: 500; |
329 | | - padding: 10px 16px; |
| 335 | + min-width: 0; |
| 336 | + max-width: 100%; |
| 337 | + padding: 6px 6px 6px 14px; |
| 338 | + border-radius: var(--radius-full); |
| 339 | + border: 1px solid color-mix(in srgb, var(--warn) 36%, var(--border)); |
| 340 | + background: color-mix( |
| 341 | + in srgb, |
| 342 | + var(--warn) 10%, |
| 343 | + color-mix(in srgb, var(--bg-elevated) 86%, transparent) |
| 344 | + ); |
| 345 | + backdrop-filter: blur(12px) saturate(1.4); |
| 346 | + -webkit-backdrop-filter: blur(12px) saturate(1.4); |
| 347 | + box-shadow: var(--shadow-md); |
| 348 | + font-size: 13px; |
| 349 | + animation: connection-banner-enter 0.25s var(--ease-out); |
| 350 | +} |
| 351 | + |
| 352 | +@keyframes connection-banner-enter { |
| 353 | + from { |
| 354 | + opacity: 0; |
| 355 | + transform: translateY(-6px); |
| 356 | + } |
| 357 | + to { |
| 358 | + opacity: 1; |
| 359 | + transform: translateY(0); |
| 360 | + } |
| 361 | +} |
| 362 | + |
| 363 | +@media (prefers-reduced-motion: reduce) { |
| 364 | + .connection-banner__pill { |
| 365 | + animation: none; |
| 366 | + } |
330 | 367 | } |
331 | 368 |
|
332 | 369 | .connection-banner__spinner { |
333 | 370 | display: inline-flex; |
334 | 371 | align-items: center; |
| 372 | + color: var(--warn); |
335 | 373 | } |
336 | 374 |
|
337 | 375 | .connection-banner__spinner svg { |
338 | | - width: 16px; |
339 | | - height: 16px; |
| 376 | + width: 14px; |
| 377 | + height: 14px; |
340 | 378 | fill: none; |
341 | 379 | stroke: currentColor; |
342 | 380 | stroke-width: 2; |
|
350 | 388 | } |
351 | 389 | } |
352 | 390 |
|
353 | | -.connection-banner__hint { |
354 | | - margin-left: 6px; |
355 | | - font-weight: 400; |
356 | | - opacity: 0.75; |
| 391 | +.connection-banner__title { |
| 392 | + color: var(--text-strong); |
| 393 | + font-weight: 600; |
| 394 | + white-space: nowrap; |
| 395 | +} |
| 396 | + |
| 397 | +.connection-banner__state { |
| 398 | + color: var(--muted); |
| 399 | + white-space: nowrap; |
| 400 | +} |
| 401 | + |
| 402 | +/* Announced by the role="status" region and mirrored in the pill tooltip; |
| 403 | + too long to keep visible in the compact pill. */ |
| 404 | +.connection-banner__sr-hint { |
| 405 | + position: absolute; |
| 406 | + width: 1px; |
| 407 | + height: 1px; |
| 408 | + margin: -1px; |
| 409 | + padding: 0; |
| 410 | + overflow: hidden; |
| 411 | + clip: rect(0 0 0 0); |
| 412 | + white-space: nowrap; |
357 | 413 | } |
358 | 414 |
|
359 | 415 | .connection-banner .connection-banner__retry { |
360 | | - border-color: currentColor; |
361 | | - color: currentColor; |
| 416 | + border-radius: var(--radius-full); |
| 417 | + border-color: color-mix(in srgb, var(--warn) 42%, var(--border)); |
| 418 | + background: transparent; |
| 419 | + color: var(--text-strong); |
362 | 420 | font-size: 12px; |
363 | 421 | padding: 4px 12px; |
| 422 | + white-space: nowrap; |
364 | 423 | } |
365 | 424 |
|
366 | 425 | .connection-banner .connection-banner__retry:hover:not(:disabled) { |
367 | | - border-color: currentColor; |
368 | | - background: color-mix(in srgb, currentColor 14%, transparent); |
| 426 | + border-color: color-mix(in srgb, var(--warn) 60%, var(--border)); |
| 427 | + background: color-mix(in srgb, var(--warn) 14%, transparent); |
| 428 | +} |
| 429 | + |
| 430 | +@media (max-width: 640px) { |
| 431 | + .connection-banner__state { |
| 432 | + display: none; |
| 433 | + } |
369 | 434 | } |
370 | 435 |
|
371 | 436 | /* =========================================== |
|
0 commit comments