Skip to content

Commit

Permalink
refactor(github): remove invalid theme warning & cleanup applicators (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
uncenter authored Jan 25, 2025
1 parent 21fd67a commit 43cd3b7
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions styles/github/catppuccin.user.less
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 43cd3b7

Please sign in to comment.