Skip to content

armgit / Handy

Public Imported from GitHub
0

A free, open source, and extensible speech-to-text application that works completely offline.

better scrollbars on macos

CJ Pais012e066697d2
diff --git a/src/App.css b/src/App.css
index 44b05892..2aed759b 100644
--- a/src/App.css
+++ b/src/App.css
@@ -62,17 +62,22 @@
}
}
-/* Custom Scrollbar */
-::-webkit-scrollbar {
+/* macOS - tint native overlay scrollbar thumb */
+:root[data-platform="macos"] {
+ scrollbar-color: var(--scrollbar-thumb) transparent;
+}
+
+/* Custom Scrollbar - only on Windows/Linux; macOS uses native overlay scrollbars */
+:root:not([data-platform="macos"]) ::-webkit-scrollbar {
width: 14px;
height: 14px;
}
-::-webkit-scrollbar-track {
+:root:not([data-platform="macos"]) ::-webkit-scrollbar-track {
background: transparent;
}
-::-webkit-scrollbar-thumb {
+:root:not([data-platform="macos"]) ::-webkit-scrollbar-thumb {
background-color: var(--scrollbar-thumb);
border-radius: 20px;
border: 3px solid transparent;
@@ -82,7 +87,7 @@
min-height: 32px;
}
-::-webkit-scrollbar-thumb:hover {
+:root:not([data-platform="macos"]) ::-webkit-scrollbar-thumb:hover {
background-color: var(--scrollbar-thumb-hover);
}
diff --git a/src/main.tsx b/src/main.tsx
index c31c1e9a..1e83ae74 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -1,7 +1,11 @@
import React from "react";
import ReactDOM from "react-dom/client";
+import { platform } from "@tauri-apps/plugin-os";
import App from "./App";
+// Set platform before render so CSS can scope per-platform (e.g. scrollbar styles)
+document.documentElement.dataset.platform = platform();
+
// Initialize i18n
import "./i18n";