Skip to content

Commit c52996a

Browse files
committed
Polish shell spacing and scrollbar styling
Adjust the AppShell canvas wrapper to keep visible padding on all sides at large breakpoints, so the floating canvas stays visually separated from the sidebar too. Add global themed scrollbar styles (Firefox + WebKit) to align scroll regions with the app palette, including hover states and transparent tracks/corners.
1 parent f6f9ea5 commit c52996a

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

‎src/components/layout/AppShell.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ export function AppShell() {
101101
bell far right. A shrink-0 sibling of the canvas, so the canvas
102102
gives up exactly its height and stays the only scroll region. */}
103103
<TopBar onSearch={openSearch} />
104-
<div className="flex min-h-0 flex-1 flex-col p-2 pt-0 lg:p-3 lg:pl-0 lg:pt-3">
104+
{/* Visible gap on every side between the floating canvas and the
105+
outer shell (including sidebar-side, so the canvas is narrower). */}
106+
<div className="flex min-h-0 flex-1 flex-col p-2 pt-0 lg:p-3 lg:pt-3">
105107
{/* Deliberate 8px exception to the 6px radius rule: the floating
106108
canvas alone reads better slightly softer at shell scale. */}
107109
<main className="min-h-0 flex-1 overflow-y-auto rounded-[8px] border border-steel/20 bg-canvas">

‎src/index.css‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,36 @@
2727
::selection {
2828
@apply bg-primary/40 text-charcoal;
2929
}
30+
31+
/* Themed scrollbars, matching the shell palette in every scroll region
32+
(canvas, sidebar nav, popovers). Standard properties for Firefox and
33+
modern Chromium; the -webkit rules cover Safari. */
34+
* {
35+
scrollbar-width: thin;
36+
scrollbar-color: theme('colors.steel / 40%') transparent;
37+
}
38+
39+
::-webkit-scrollbar {
40+
width: 10px;
41+
height: 10px;
42+
}
43+
44+
::-webkit-scrollbar-track {
45+
background: transparent;
46+
}
47+
48+
::-webkit-scrollbar-thumb {
49+
border-radius: 9999px;
50+
border: 2px solid transparent;
51+
background-clip: content-box;
52+
background-color: theme('colors.steel / 40%');
53+
}
54+
55+
::-webkit-scrollbar-thumb:hover {
56+
background-color: theme('colors.steel / 60%');
57+
}
58+
59+
::-webkit-scrollbar-corner {
60+
background: transparent;
61+
}
3062
}

0 commit comments

Comments
 (0)