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
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta name="color-scheme" content="dark" />
|
||||||
<title>Claudia - Claude Code Session Browser</title>
|
<title>Claudia - Claude Code Session Browser</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@@ -254,7 +254,7 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Main content area */}
|
{/* Main content area */}
|
||||||
<div className="flex-1 flex overflow-hidden">
|
<div className="flex-1 flex">
|
||||||
{showPreview ? (
|
{showPreview ? (
|
||||||
<SplitPane
|
<SplitPane
|
||||||
left={
|
left={
|
||||||
|
@@ -25,16 +25,7 @@ export const ScrollArea = React.forwardRef<HTMLDivElement, ScrollAreaProps>(
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn("relative overflow-auto", className)}
|
||||||
"relative overflow-auto",
|
|
||||||
// Custom scrollbar styling
|
|
||||||
"scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent",
|
|
||||||
"[&::-webkit-scrollbar]:w-2",
|
|
||||||
"[&::-webkit-scrollbar-track]:bg-transparent",
|
|
||||||
"[&::-webkit-scrollbar-thumb]:bg-border [&::-webkit-scrollbar-thumb]:rounded-full",
|
|
||||||
"[&::-webkit-scrollbar-thumb:hover]:bg-border/80",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
120
src/styles.css
120
src/styles.css
@@ -137,6 +137,10 @@
|
|||||||
border-color: var(--color-border);
|
border-color: var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
color-scheme: dark;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: var(--color-background);
|
background-color: var(--color-background);
|
||||||
color: var(--color-foreground);
|
color: var(--color-foreground);
|
||||||
@@ -660,115 +664,57 @@ button:focus-visible,
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- THEME-MATCHING SCROLLBARS --- */
|
/* --- ELEGANT SCROLLBARS --- */
|
||||||
|
|
||||||
/* For Firefox */
|
/* Firefox - thin and minimal */
|
||||||
* {
|
* {
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
scrollbar-color: var(--color-muted-foreground) var(--color-background);
|
scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For Webkit Browsers (Chrome, Safari, Edge) */
|
/* Global webkit scrollbar - ultra thin and elegant */
|
||||||
*::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 12px;
|
width: 3px;
|
||||||
height: 12px;
|
height: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
*::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
background: var(--color-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
*::-webkit-scrollbar-thumb {
|
|
||||||
background-color: var(--color-muted);
|
|
||||||
border-radius: 6px;
|
|
||||||
border: 3px solid var(--color-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
*::-webkit-scrollbar-thumb:hover {
|
|
||||||
background-color: var(--color-muted-foreground);
|
|
||||||
}
|
|
||||||
|
|
||||||
*::-webkit-scrollbar-corner {
|
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Code blocks and editors specific scrollbar */
|
::-webkit-scrollbar-thumb {
|
||||||
|
background-color: rgba(156, 163, 175, 0.5);
|
||||||
|
border-radius: 2px;
|
||||||
|
transition: background-color 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background-color: rgba(156, 163, 175, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-corner {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Code blocks - slightly larger for better usability */
|
||||||
pre::-webkit-scrollbar,
|
pre::-webkit-scrollbar,
|
||||||
.w-md-editor-content::-webkit-scrollbar,
|
.w-md-editor-content::-webkit-scrollbar,
|
||||||
code::-webkit-scrollbar,
|
code::-webkit-scrollbar {
|
||||||
.overflow-auto::-webkit-scrollbar {
|
|
||||||
width: 8px;
|
width: 8px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre::-webkit-scrollbar-thumb,
|
pre::-webkit-scrollbar-thumb,
|
||||||
.w-md-editor-content::-webkit-scrollbar-thumb,
|
.w-md-editor-content::-webkit-scrollbar-thumb,
|
||||||
code::-webkit-scrollbar-thumb,
|
code::-webkit-scrollbar-thumb {
|
||||||
.overflow-auto::-webkit-scrollbar-thumb {
|
background-color: rgba(156, 163, 175, 0.4);
|
||||||
background-color: rgba(107, 114, 128, 0.2);
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre::-webkit-scrollbar-thumb:hover,
|
pre::-webkit-scrollbar-thumb:hover,
|
||||||
.w-md-editor-content::-webkit-scrollbar-thumb:hover,
|
.w-md-editor-content::-webkit-scrollbar-thumb:hover,
|
||||||
code::-webkit-scrollbar-thumb:hover,
|
code::-webkit-scrollbar-thumb:hover {
|
||||||
.overflow-auto::-webkit-scrollbar-thumb:hover {
|
background-color: rgba(156, 163, 175, 0.6);
|
||||||
background-color: rgba(107, 114, 128, 0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Syntax highlighter specific */
|
|
||||||
.bg-zinc-950 ::-webkit-scrollbar {
|
|
||||||
width: 8px;
|
|
||||||
height: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-zinc-950 ::-webkit-scrollbar-track {
|
|
||||||
background: rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-zinc-950 ::-webkit-scrollbar-thumb {
|
|
||||||
background-color: rgba(107, 114, 128, 0.3);
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-zinc-950 ::-webkit-scrollbar-thumb:hover {
|
|
||||||
background-color: rgba(107, 114, 128, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Code preview specific scrollbar */
|
|
||||||
.code-preview-scroll::-webkit-scrollbar {
|
|
||||||
width: 12px;
|
|
||||||
height: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-preview-scroll::-webkit-scrollbar-track {
|
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-preview-scroll::-webkit-scrollbar-thumb {
|
|
||||||
background-color: rgba(107, 114, 128, 0.4);
|
|
||||||
border-radius: 6px;
|
|
||||||
border: 2px solid transparent;
|
|
||||||
background-clip: content-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-preview-scroll::-webkit-scrollbar-thumb:hover {
|
|
||||||
background-color: rgba(107, 114, 128, 0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-preview-scroll::-webkit-scrollbar-thumb:active {
|
|
||||||
background-color: rgba(107, 114, 128, 0.8);
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-preview-scroll::-webkit-scrollbar-corner {
|
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Firefox scrollbar for code preview */
|
|
||||||
.code-preview-scroll {
|
|
||||||
scrollbar-width: thin;
|
|
||||||
scrollbar-color: rgba(107, 114, 128, 0.4) rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NFO Credits Scanlines Animation */
|
/* NFO Credits Scanlines Animation */
|
||||||
|
Reference in New Issue
Block a user