From 43cd3b7c17d50e5392f9abd1d4ad33a32a3bc4b5 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Sat, 25 Jan 2025 12:40:13 -0500 Subject: [PATCH] refactor(github): remove invalid theme warning & cleanup applicators (#1595) --- styles/github/catppuccin.user.less | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/styles/github/catppuccin.user.less b/styles/github/catppuccin.user.less index 87202c1f..5f83af8b 100644 --- a/styles/github/catppuccin.user.less +++ b/styles/github/catppuccin.user.less @@ -15,9 +15,12 @@ @var select accentColor "Accent" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve*", "red:Red", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire", "sky:Sky", "lavender:Lavender", "subtext0:Gray"] ==/UserStyle== */ -@-moz-document regexp( - "https:\/\/(gist\.)*github\.com(?!((\/.+?\/.+?\/commit\/[A-Fa-f0-9]+\.(patch|diff)$)|\/home$|\/features($|\/.*)|\/marketplace($|\?.*|\/.*)|\/organizations\/plan)).*$" +@-moz-document + /* Match every page on GitHub except github.com/home, github.com/features/*, and github.com/organizations/plan. */ + regexp( + "https:\/\/github\.com(?!(\/home$|\/features($|\/.*)|\/organizations\/plan)).*$" ), + domain("gist.github.com"), domain("viewscreen.githubusercontent.com") { [data-color-mode="auto"] { @media (prefers-color-scheme: light) { @@ -47,23 +50,6 @@ #catppuccin(@lightFlavor); } - html:not([data-light-theme="light"], [data-light-theme="dark"]) - body:not(.logged-out)::after, - html:not([data-dark-theme="dark"], [data-dark-theme="light"]) - body:not(.logged-out)::after { - position: fixed; - top: 0; - left: 0; - padding: 1rem; - margin: 1rem; - border-radius: 0.5rem; - max-width: 40ch; - background-color: var(--color-danger-fg); - color: var(--color-header-bg); - content: "Unsupported GitHub theme detected! Please switch to the default light/dark theme via the GitHub Appearance settings to get the best experience for the Catppuccin GitHub userstyle."; - z-index: 9999; - } - #catppuccin(@flavor) { @rosewater: @catppuccin[@@flavor][@rosewater]; @flamingo: @catppuccin[@@flavor][@flamingo];