catppuccin / userstyles

🖌 Soothing pastel userstyles
MIT License
469 stars 137 forks source link

youtube: add option to use system theme instead of youtube one #814

Closed aemogie closed 5 months ago

aemogie commented 5 months ago

Is there an existing issue outlining your problem?

What userstyles are you seeing the problem on?

lbl:youtube

Describe your problem.

link to discord discussion

for the youtube style can i suggest adding a toggle for switching between depending on youtube's light/dark mode vs using the system theme?

using youtube's "Use device theme" feature requires me to refresh the page to update light/dark mode changes after i change it externally, which is not ideal if i'm watching a video as i might lose where i paused.

Attach screenshots.

No response

What browser(s) are you seeing the problem on?

Firefox 124.0b5

Any additional comments?

(something like this might work?)

@var checkbox follow-system "Follow system theme" 0
==/UserStyle== */

@-moz-document domain('youtube.com') {
  & when (@follow-system = 1) {
    @media (prefers-color-scheme: light) {
      :root {
        #catppuccin(@lightFlavor, @accentColor);
      }
    }
    @media (prefers-color-scheme: dark) {
      :root {
        #catppuccin(@darkFlavor, @accentColor);
      }
    }
  }

  & when (@follow-system = 0) {
    :root[dark] {
      #catppuccin(@darkFlavor, @accentColor);
    }
    :root:not([dark]) {
      #catppuccin(@lightFlavor, @accentColor);
    }
  }
aemogie commented 5 months ago

"it's kinda our policy that we just match the site ig they support it" -- uncenter in the Discord