|
103 | 103 | } |
104 | 104 |
|
105 | 105 | :root { |
| 106 | + /* Enable system color scheme for proper scrollbar colors in WKWebView */ |
| 107 | + color-scheme: light dark; |
| 108 | + |
106 | 109 | --radius: 0.65rem; |
107 | 110 |
|
108 | 111 | /* Brand palette */ |
|
197 | 200 |
|
198 | 201 | /* Dark theme */ |
199 | 202 | html.dark { |
| 203 | + /* Force dark color scheme for scrollbars in WKWebView */ |
| 204 | + color-scheme: dark; |
| 205 | + |
200 | 206 | /* Brand palette - adjusted for dark */ |
201 | 207 | --brand-oat: oklch(0.35 0.015 60); /* Darkened */ |
202 | 208 | --brand-clay: oklch(0.55 0.08 55); /* Lighter for contrast */ |
@@ -390,37 +396,40 @@ html.dark { |
390 | 396 | } |
391 | 397 | } |
392 | 398 |
|
393 | | -/* Hide native scrollbar in Radix ScrollArea - use only custom scrollbar */ |
394 | | -[data-radix-scroll-area-viewport] { |
395 | | - scrollbar-width: none !important; |
396 | | - -ms-overflow-style: none !important; |
397 | | -} |
398 | | - |
399 | | -[data-radix-scroll-area-viewport]::-webkit-scrollbar { |
400 | | - display: none !important; |
401 | | -} |
402 | | - |
403 | | -/* Custom scrollbar - outside layer for higher specificity */ |
| 399 | +/* Scrollbar styling for WKWebView */ |
404 | 400 | ::-webkit-scrollbar { |
405 | | - width: 6px !important; |
406 | | - height: 6px !important; |
| 401 | + width: 8px; |
| 402 | + height: 8px; |
| 403 | + background: transparent; |
407 | 404 | } |
408 | 405 |
|
409 | 406 | ::-webkit-scrollbar-track { |
410 | | - background: transparent !important; |
| 407 | + background: transparent; |
411 | 408 | } |
412 | 409 |
|
413 | 410 | ::-webkit-scrollbar-thumb { |
414 | | - background: color-mix(in oklch, var(--muted-foreground) 40%, transparent) !important; |
415 | | - border-radius: 3px !important; |
| 411 | + background: oklch(0.55 0.02 60 / 50%); |
| 412 | + border-radius: 4px; |
| 413 | + border: 2px solid transparent; |
| 414 | + background-clip: padding-box; |
416 | 415 | } |
417 | 416 |
|
418 | 417 | ::-webkit-scrollbar-thumb:hover { |
419 | | - background: color-mix(in oklch, var(--muted-foreground) 60%, transparent) !important; |
| 418 | + background: oklch(0.55 0.02 60 / 70%); |
| 419 | + background-clip: padding-box; |
| 420 | +} |
| 421 | + |
| 422 | +::-webkit-scrollbar-corner { |
| 423 | + background: transparent; |
| 424 | +} |
| 425 | + |
| 426 | +/* Dark mode scrollbar */ |
| 427 | +html.dark ::-webkit-scrollbar-thumb { |
| 428 | + background: oklch(0.65 0.02 60 / 40%); |
| 429 | + background-clip: padding-box; |
420 | 430 | } |
421 | 431 |
|
422 | | -/* Firefox scrollbar */ |
423 | | -* { |
424 | | - scrollbar-width: thin !important; |
425 | | - scrollbar-color: color-mix(in oklch, var(--muted-foreground) 40%, transparent) transparent !important; |
| 432 | +html.dark ::-webkit-scrollbar-thumb:hover { |
| 433 | + background: oklch(0.65 0.02 60 / 60%); |
| 434 | + background-clip: padding-box; |
426 | 435 | } |
0 commit comments