From 61c0c5b8af5dd2cf327f922316a9ce90ee52c523 Mon Sep 17 00:00:00 2001 From: WalkQuackBack <163211185+WalkQuackBack@users.noreply.github.com> Date: Wed, 26 Mar 2025 12:52:09 -0600 Subject: [PATCH] fix(google-drive): applicator selectors (#1674) Co-authored-by: uncenter --- scripts/userstyles.yml | 4 +++- styles/google-drive/catppuccin.user.less | 23 ++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/scripts/userstyles.yml b/scripts/userstyles.yml index 1cc74875..6bf48cfa 100644 --- a/scripts/userstyles.yml +++ b/scripts/userstyles.yml @@ -123,6 +123,8 @@ collaborators: url: https://github.com/pynappo - &nuexq url: https://github.com/nuexq + - &WalkQuackBack + url: https://github.com/WalkQuackBack userstyles: advent-of-code: @@ -381,7 +383,7 @@ userstyles: color: blue readme: app-link: https://drive.google.com - current-maintainers: [*r58Playz] + current-maintainers: [*r58Playz, *WalkQuackBack] google-photos: name: Google Photos categories: [photo_and_video] diff --git a/styles/google-drive/catppuccin.user.less b/styles/google-drive/catppuccin.user.less index 45ee7e63..1342de71 100644 --- a/styles/google-drive/catppuccin.user.less +++ b/styles/google-drive/catppuccin.user.less @@ -16,18 +16,15 @@ ==/UserStyle== */ @-moz-document domain("drive.google.com") { - :root:has(.KkxPLb) { - .vhoiae.vhoiae.vhoiae, - & { - #catppuccin(@lightFlavor); - } - } - :root:has(.LgGVmb) { - .vhoiae.vhoiae.vhoiae, - & { - #catppuccin(@darkFlavor); - } - } + .vhoiae { + &.KkxPLb { + #catppuccin(@lightFlavor); + } + + &.LgGVmb, .yYWAMb.bvmRsc, .dif24c.bvmRsc { + #catppuccin(@darkFlavor); + } + } #catppuccin(@flavor) { @rosewater: @catppuccin[@@flavor][@rosewater]; @@ -58,7 +55,7 @@ @crust: @catppuccin[@@flavor][@crust]; @accent: @catppuccin[@@flavor][@@accentColor]; - color-scheme: if(@flavor = latte, light, dark); + // Color scheme is already set by Google Drive; setting it here causes bugs, and there are no known side effects as Google does not use native UI elements (which would reflect `color-scheme` state and cause potential issues). ::selection { background-color: fade(@accent, 30%);