Skip to content

Commit 6780008

Browse files
committed
Merge pull request #234 from brennercruvinel/improve/performance-improvements
Fix white scrollbar issue in Tauri dark theme - Added color-scheme: dark meta tag for native dark scrollbar support - Implemented ultra-thin (3px) elegant scrollbars globally - Removed overflow-hidden container that was cutting scrollbar - Cleaned up redundant CSS scrollbar styling - Optimized scrollbar appearance for both web and Tauri environments
2 parents efdeff7 + 1a888b8 commit 6780008

File tree

4 files changed

+30
-92
lines changed

4 files changed

+30
-92
lines changed

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<meta name="color-scheme" content="dark" />
78
<title>Claudia - Claude Code Session Browser</title>
89
</head>
910

src/components/ClaudeCodeSession.refactored.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
254254
/>
255255

256256
{/* Main content area */}
257-
<div className="flex-1 flex overflow-hidden">
257+
<div className="flex-1 flex">
258258
{showPreview ? (
259259
<SplitPane
260260
left={

src/components/ui/scroll-area.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,7 @@ export const ScrollArea = React.forwardRef<HTMLDivElement, ScrollAreaProps>(
2525
return (
2626
<div
2727
ref={ref}
28-
className={cn(
29-
"relative overflow-auto",
30-
// Custom scrollbar styling
31-
"scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent",
32-
"[&::-webkit-scrollbar]:w-2",
33-
"[&::-webkit-scrollbar-track]:bg-transparent",
34-
"[&::-webkit-scrollbar-thumb]:bg-border [&::-webkit-scrollbar-thumb]:rounded-full",
35-
"[&::-webkit-scrollbar-thumb:hover]:bg-border/80",
36-
className
37-
)}
28+
className={cn("relative overflow-auto", className)}
3829
{...props}
3930
>
4031
{children}

src/styles.css

Lines changed: 27 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@
137137
border-color: var(--color-border);
138138
}
139139

140+
html {
141+
color-scheme: dark;
142+
}
143+
140144
body {
141145
background-color: var(--color-background);
142146
color: var(--color-foreground);
@@ -660,115 +664,57 @@ button:focus-visible,
660664
z-index: 1;
661665
}
662666

663-
/* --- THEME-MATCHING SCROLLBARS --- */
667+
/* --- ELEGANT SCROLLBARS --- */
664668

665-
/* For Firefox */
669+
/* Firefox - thin and minimal */
666670
* {
667671
scrollbar-width: thin;
668-
scrollbar-color: var(--color-muted-foreground) var(--color-background);
672+
scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
669673
}
670674

671-
/* For Webkit Browsers (Chrome, Safari, Edge) */
672-
*::-webkit-scrollbar {
673-
width: 12px;
674-
height: 12px;
675+
/* Global webkit scrollbar - ultra thin and elegant */
676+
::-webkit-scrollbar {
677+
width: 3px;
678+
height: 3px;
675679
}
676680

677-
*::-webkit-scrollbar-track {
678-
background: var(--color-background);
681+
::-webkit-scrollbar-track {
682+
background: transparent;
679683
}
680684

681-
*::-webkit-scrollbar-thumb {
682-
background-color: var(--color-muted);
683-
border-radius: 6px;
684-
border: 3px solid var(--color-background);
685+
::-webkit-scrollbar-thumb {
686+
background-color: rgba(156, 163, 175, 0.5);
687+
border-radius: 2px;
688+
transition: background-color 0.2s ease;
685689
}
686690

687-
*::-webkit-scrollbar-thumb:hover {
688-
background-color: var(--color-muted-foreground);
691+
::-webkit-scrollbar-thumb:hover {
692+
background-color: rgba(156, 163, 175, 0.6);
689693
}
690694

691-
*::-webkit-scrollbar-corner {
695+
::-webkit-scrollbar-corner {
692696
background: transparent;
693697
}
694698

695-
/* Code blocks and editors specific scrollbar */
699+
/* Code blocks - slightly larger for better usability */
696700
pre::-webkit-scrollbar,
697701
.w-md-editor-content::-webkit-scrollbar,
698-
code::-webkit-scrollbar,
699-
.overflow-auto::-webkit-scrollbar {
702+
code::-webkit-scrollbar {
700703
width: 8px;
701704
height: 8px;
702705
}
703706

704707
pre::-webkit-scrollbar-thumb,
705708
.w-md-editor-content::-webkit-scrollbar-thumb,
706-
code::-webkit-scrollbar-thumb,
707-
.overflow-auto::-webkit-scrollbar-thumb {
708-
background-color: rgba(107, 114, 128, 0.2);
709+
code::-webkit-scrollbar-thumb {
710+
background-color: rgba(156, 163, 175, 0.4);
711+
border-radius: 4px;
709712
}
710713

711714
pre::-webkit-scrollbar-thumb:hover,
712715
.w-md-editor-content::-webkit-scrollbar-thumb:hover,
713-
code::-webkit-scrollbar-thumb:hover,
714-
.overflow-auto::-webkit-scrollbar-thumb:hover {
715-
background-color: rgba(107, 114, 128, 0.4);
716-
}
717-
718-
/* Syntax highlighter specific */
719-
.bg-zinc-950 ::-webkit-scrollbar {
720-
width: 8px;
721-
height: 8px;
722-
}
723-
724-
.bg-zinc-950 ::-webkit-scrollbar-track {
725-
background: rgba(0, 0, 0, 0.3);
726-
}
727-
728-
.bg-zinc-950 ::-webkit-scrollbar-thumb {
729-
background-color: rgba(107, 114, 128, 0.3);
730-
border-radius: 4px;
731-
}
732-
733-
.bg-zinc-950 ::-webkit-scrollbar-thumb:hover {
734-
background-color: rgba(107, 114, 128, 0.5);
735-
}
736-
737-
/* Code preview specific scrollbar */
738-
.code-preview-scroll::-webkit-scrollbar {
739-
width: 12px;
740-
height: 12px;
741-
}
742-
743-
.code-preview-scroll::-webkit-scrollbar-track {
744-
background: rgba(0, 0, 0, 0.2);
745-
border-radius: 6px;
746-
}
747-
748-
.code-preview-scroll::-webkit-scrollbar-thumb {
749-
background-color: rgba(107, 114, 128, 0.4);
750-
border-radius: 6px;
751-
border: 2px solid transparent;
752-
background-clip: content-box;
753-
}
754-
755-
.code-preview-scroll::-webkit-scrollbar-thumb:hover {
756-
background-color: rgba(107, 114, 128, 0.6);
757-
}
758-
759-
.code-preview-scroll::-webkit-scrollbar-thumb:active {
760-
background-color: rgba(107, 114, 128, 0.8);
761-
}
762-
763-
.code-preview-scroll::-webkit-scrollbar-corner {
764-
background: rgba(0, 0, 0, 0.2);
765-
border-radius: 6px;
766-
}
767-
768-
/* Firefox scrollbar for code preview */
769-
.code-preview-scroll {
770-
scrollbar-width: thin;
771-
scrollbar-color: rgba(107, 114, 128, 0.4) rgba(0, 0, 0, 0.2);
716+
code::-webkit-scrollbar-thumb:hover {
717+
background-color: rgba(156, 163, 175, 0.6);
772718
}
773719

774720
/* NFO Credits Scanlines Animation */

0 commit comments

Comments
 (0)