Style scrollbar like VS Code: no arrows, clean thumb with padding
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FGiX1wXCY5UtSrmoKBhDQu
This commit is contained in:
1 file changed
+6
-8
@@ -38,7 +38,7 @@ interface TabLogsProps {
|
|||||||
|
|
||||||
const SCROLL_PIN_THRESHOLD_PX = 8;
|
const SCROLL_PIN_THRESHOLD_PX = 8;
|
||||||
const TAIL_POLL_MS = 10_000;
|
const TAIL_POLL_MS = 10_000;
|
||||||
const SCROLLBAR_SIZE = 16;
|
const SCROLLBAR_SIZE = 14;
|
||||||
|
|
||||||
const isScrolledToBottom = (el: HTMLElement) =>
|
const isScrolledToBottom = (el: HTMLElement) =>
|
||||||
el.scrollHeight - el.scrollTop - el.clientHeight <= SCROLL_PIN_THRESHOLD_PX;
|
el.scrollHeight - el.scrollTop - el.clientHeight <= SCROLL_PIN_THRESHOLD_PX;
|
||||||
@@ -216,19 +216,17 @@ export const TabLogs = ({ monitorId, containerName, enabled }: TabLogsProps) =>
|
|||||||
padding={LAYOUT.MD}
|
padding={LAYOUT.MD}
|
||||||
sx={{
|
sx={{
|
||||||
overflowAnchor: "none",
|
overflowAnchor: "none",
|
||||||
scrollbarWidth: "thin",
|
scrollbarWidth: "auto",
|
||||||
scrollbarColor: "#11715b transparent",
|
scrollbarColor: "#11715b transparent",
|
||||||
"&::-webkit-scrollbar": { width: SCROLLBAR_SIZE, height: SCROLLBAR_SIZE },
|
"&::-webkit-scrollbar": { width: SCROLLBAR_SIZE, height: SCROLLBAR_SIZE },
|
||||||
"&::-webkit-scrollbar-track": { background: "transparent" },
|
"&::-webkit-scrollbar-track": { background: "transparent" },
|
||||||
"&::-webkit-scrollbar-thumb": {
|
"&::-webkit-scrollbar-thumb": {
|
||||||
background: "#11715b",
|
background: "#11715b",
|
||||||
borderRadius: 3,
|
borderRadius: 2,
|
||||||
},
|
border: "2px solid transparent",
|
||||||
"&::-webkit-scrollbar-button": {
|
backgroundClip: "padding-box",
|
||||||
backgroundColor: "#11715b",
|
|
||||||
width: SCROLLBAR_SIZE,
|
|
||||||
height: SCROLLBAR_SIZE,
|
|
||||||
},
|
},
|
||||||
|
"&::-webkit-scrollbar-button": { display: "none" },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{rows.length > 0 && (
|
{rows.length > 0 && (
|
||||||
|
|||||||
Reference in new issue
Block a user