From 445c30f3a99d01f05535aff6194a7aa12f0decc1 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Sun, 23 Mar 2025 06:57:36 -0700 Subject: [PATCH] Fix iframe scrollbar --- src-web/main.css | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/src-web/main.css b/src-web/main.css index 8a053e23..5e7a4b37 100644 --- a/src-web/main.css +++ b/src-web/main.css @@ -66,22 +66,31 @@ * Mac doesn't like this (especially in CodeMirror) so we only do it on non-macos platforms. On Mac, * styling the scrollbar seems to cause them to not show up at all most of the time */ - html:not([data-platform="macos"]) * { - ::-webkit-scrollbar-corner, - ::-webkit-scrollbar { - @apply w-[10px] h-[10px]; + html:not([data-platform="macos"]) { + * { + ::-webkit-scrollbar-corner, + ::-webkit-scrollbar { + @apply w-[10px] h-[10px]; + } + + .scrollbar-track, + ::-webkit-scrollbar-corner, + ::-webkit-scrollbar { + @apply bg-transparent; + } + + &:hover { + &.scrollbar-thumb, + &::-webkit-scrollbar-thumb { + @apply bg-text-subtlest hover:bg-text-subtle rounded-[2px]; + } + } } - .scrollbar-track, - ::-webkit-scrollbar-corner, - ::-webkit-scrollbar { - @apply bg-transparent; - } - - &:hover { - &.scrollbar-thumb, - &::-webkit-scrollbar-thumb { - @apply bg-text-subtlest hover:bg-text-subtle rounded-[2px]; + iframe { + &::-webkit-scrollbar-corner, + &::-webkit-scrollbar { + @apply bg-surface-highlight !important; } } } @@ -90,13 +99,6 @@ direction: rtl; } - iframe { - &::-webkit-scrollbar-corner, - &::-webkit-scrollbar { - @apply bg-surface-highlight !important; - } - } - :root { color-scheme: light dark; --transition-duration: 100ms ease-in-out;