Files
paseo/packages/app/src/styles/web-scrollbar.ts
T
Mohamed Boudra d99258cdd0 fix(app): keep web scrollbars from shifting content
Use an overlay scrollbar for desktop chat timelines so scrollbar gutters cannot move centered content. Share its behavior with existing workspace scrollbars and derive resting and hover colors from semantic foreground tokens.
2026-08-16 12:45:06 +02:00

15 lines
463 B
TypeScript

export const WEB_SCROLLBAR_WIDTH = "thin";
export const WEB_SCROLLBAR_SIZE_PX = 8;
export const WEB_SCROLLBAR_RESTING_OPACITY = 0.4;
export function webScrollbarThumbColor(
handleColor: string,
opacity = WEB_SCROLLBAR_RESTING_OPACITY,
): string {
return `color-mix(in srgb, ${handleColor} ${opacity * 100}%, transparent)`;
}
export function webScrollbarColor(handleColor: string): string {
return `${webScrollbarThumbColor(handleColor)} transparent`;
}