File tree Expand file tree Collapse file tree 6 files changed +59
-52
lines changed
Expand file tree Collapse file tree 6 files changed +59
-52
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import styled from "@emotion/styled";
33import { Global , css } from "@emotion/react" ;
44import { GlobalColors } from "./styles/colors" ;
55import { GlobalFonts } from "./styles/fonts" ;
6+ import { GlobalScrollbars } from "./styles/scrollbars" ;
67import type { ProjectConfig } from "./config" ;
78import type { WorkspaceSelection } from "./components/ProjectSidebar" ;
89import ProjectSidebar from "./components/ProjectSidebar" ;
@@ -462,6 +463,7 @@ function AppInner() {
462463 < >
463464 < GlobalColors />
464465 < GlobalFonts />
466+ < GlobalScrollbars />
465467 < Global styles = { globalStyles } />
466468 < AppContainer >
467469 < ProjectSidebar
Original file line number Diff line number Diff line change @@ -50,24 +50,6 @@ const Tooltip = styled.div<{ show: boolean }>`
5050 transition:
5151 opacity 0.2s,
5252 visibility 0.2s;
53-
54- &::-webkit-scrollbar {
55- width: 8px;
56- height: 8px;
57- }
58-
59- &::-webkit-scrollbar-track {
60- background: transparent;
61- }
62-
63- &::-webkit-scrollbar-thumb {
64- background: #424242;
65- border-radius: 4px;
66- }
67-
68- &::-webkit-scrollbar-thumb:hover {
69- background: #4e4e4e;
70- }
7153` ;
7254
7355const BranchHeader = styled . div `
Original file line number Diff line number Diff line change @@ -91,23 +91,6 @@ const CollapseButton = styled.button`
9191const ProjectsList = styled . div `
9292 flex: 1;
9393 overflow-y: auto;
94-
95- &::-webkit-scrollbar {
96- width: 8px;
97- }
98-
99- &::-webkit-scrollbar-track {
100- background: transparent;
101- }
102-
103- &::-webkit-scrollbar-thumb {
104- background: #424242;
105- border-radius: 4px;
106- }
107-
108- &::-webkit-scrollbar-thumb:hover {
109- background: #4e4e4e;
110- }
11194` ;
11295
11396const EmptyState = styled . div `
Original file line number Diff line number Diff line change @@ -10,23 +10,6 @@ const SecretsList = styled.div`
1010 overflow-y: auto;
1111 margin-bottom: 16px;
1212 min-height: 200px;
13-
14- &::-webkit-scrollbar {
15- width: 8px;
16- }
17-
18- &::-webkit-scrollbar-track {
19- background: transparent;
20- }
21-
22- &::-webkit-scrollbar-thumb {
23- background: #424242;
24- border-radius: 4px;
25- }
26-
27- &::-webkit-scrollbar-thumb:hover {
28- background: #4e4e4e;
29- }
3013` ;
3114
3215const SecretsGrid = styled . div `
Original file line number Diff line number Diff line change @@ -121,6 +121,11 @@ export const GlobalColors = () => (
121121 --color-input-text : hsl (0 0% 80% );
122122 --color-input-border : hsl (207 51% 59% ); /* VS Code blue */
123123 --color-input-border-focus : hsl (193 91% 64% ); /* Lighter blue on focus */
124+
125+ /* Scrollbar Colors */
126+ --scrollbar-track : hsl (0 0% 18% );
127+ --scrollbar-thumb : hsl (0 0% 32% );
128+ --scrollbar-thumb-hover : hsl (0 0% 42% );
124129 }
125130 ` }
126131 />
Original file line number Diff line number Diff line change 1+ import { Global , css } from "@emotion/react" ;
2+
3+ /**
4+ * Global scrollbar styles for the application
5+ *
6+ * These styles provide consistent, attractive scrollbars across all platforms,
7+ * especially improving the appearance on Linux which uses default browser scrollbars.
8+ *
9+ * Uses both webkit-scrollbar (Chrome/Edge/Electron) and the standard scrollbar properties
10+ * for Firefox support.
11+ */
12+ export const GlobalScrollbars = ( ) => (
13+ < Global
14+ styles = { css `
15+ /* Set dark color scheme to force dark scrollbars on Chromium/Linux */
16+ : root {
17+ color-scheme : dark;
18+ }
19+
20+ /* Firefox scrollbar styling */
21+ * {
22+ scrollbar-width : thin;
23+ scrollbar-color : var (--scrollbar-thumb ) var (--scrollbar-track );
24+ }
25+
26+ /* Webkit scrollbar styling (Chrome, Edge, Electron) */
27+ ::-webkit-scrollbar {
28+ width : 10px ;
29+ height : 10px ;
30+ background : var (--scrollbar-track );
31+ }
32+
33+ ::-webkit-scrollbar-track {
34+ background : var (--scrollbar-track );
35+ }
36+
37+ ::-webkit-scrollbar-thumb {
38+ background : var (--scrollbar-thumb );
39+ border-radius : 5px ;
40+ border : 2px solid var (--scrollbar-track );
41+ }
42+
43+ ::-webkit-scrollbar-thumb : hover {
44+ background : var (--scrollbar-thumb-hover );
45+ }
46+
47+ ::-webkit-scrollbar-corner {
48+ background : var (--scrollbar-track );
49+ }
50+ ` }
51+ />
52+ ) ;
You can’t perform that action at this time.
0 commit comments