Settings › Appearance › Hide scrollbars removes every scrollbar in the app; the mouse wheel, touchpad, touch and keyboard still scroll. - hideScrollbars setting (default off), coerced to a boolean by healSettings; portable like the theme, no store version bump (the heal back-fills it, and older builds can still read newer backups) - applied as <html class="hide-scrollbars">: theme-init.js before first paint, main.tsx at boot, an App store subscription afterwards (the toggle, a restored backup and its undo) - unlayered CSS beats .scrollbar-thin: scrollbar-width: none on every element for Chromium and Firefox, ::-webkit-scrollbar for the WebKit webviews on macOS and Linux - labels in 8 locales Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 lines
448 B
TypeScript
10 lines
448 B
TypeScript
/**
|
||
* Settings › Appearance › Hide scrollbars (v1.1.0). A class on <html> that
|
||
* globals.css turns into `scrollbar-width: none` everywhere; scrolling itself
|
||
* is untouched. public/theme-init.js sets the same class before first paint —
|
||
* it cannot import this module, so keep the name in step there.
|
||
*/
|
||
export function applyHideScrollbars(hidden: boolean): void {
|
||
document.documentElement.classList.toggle("hide-scrollbars", hidden);
|
||
}
|