From d2e18c8a4f6bfe3cbc6642eeac75a13bffae3466 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:59:13 +0800 Subject: [PATCH] feat(github): enforce built-in theme (#154) --- src/userstyles.yml | 3 +- styles/github/README.md | 3 +- styles/github/catppuccin.user.css | 174 ++++++++++++++++-------------- 3 files changed, 99 insertions(+), 81 deletions(-) diff --git a/src/userstyles.yml b/src/userstyles.yml index e30607c2..3b6457e9 100644 --- a/src/userstyles.yml +++ b/src/userstyles.yml @@ -126,7 +126,7 @@ userstyles: color: green readme: app-link: "https://chess.com" - current-maintainers: [ *coldenate, *isabelroses, *skelebro1 ] + current-maintainers: [*coldenate, *isabelroses, *skelebro1] cinny: name: Cinny category: messaging @@ -171,6 +171,7 @@ userstyles: category: productivity color: text readme: + usage: "Switch to a default GitHub light/dark theme for the best experience!" app-link: "https://github.com" current-maintainers: [*pocco81, *glowingumbreon] past-maintainers: [*andreasgrafen] diff --git a/styles/github/README.md b/styles/github/README.md index 7abffa14..24f9b5b3 100644 --- a/styles/github/README.md +++ b/styles/github/README.md @@ -36,7 +36,8 @@ - +## Usage +Switch to a default GitHub light/dark theme for the best experience! diff --git a/styles/github/catppuccin.user.css b/styles/github/catppuccin.user.css index 4c3e82d5..48dd9e00 100644 --- a/styles/github/catppuccin.user.css +++ b/styles/github/catppuccin.user.css @@ -152,6 +152,22 @@ } } + html:not([data-light-theme="light"]) body::after, html:not([data-dark-theme="dark"]) body::after { + position: fixed; + top: 0; + right: 0; + padding: 1rem; + margin: 1rem; + font-size: 0.9rem; + font-weight: 600; + border-radius: 0.5rem; + max-width: 40ch; + background-color: var(--color-danger-fg); + color: var(--color-header-bg); + content: "You're using an unsupported GitHub theme! Please switch to the default light/dark theme to get the best experience for the Catppuccin GitHub userstyle."; + z-index: 9999; + } + #coloredButton(@name, @color) { --color-btn-@{name}-text: @base; --color-btn-@{name}-bg: @color; @@ -671,24 +687,24 @@ .Button--danger { background: var(--color-btn-danger-bg) } - + /* Create PR button & New branch button */ .iRoQzU, .ifkUYV, .bOZDzN { background-color: @green; color: @base; } - + /* New branch dialog */ .jenxrv { background-color: @mantle; color: @text; } - + /* Branch drop down */ .fHiIQb { background-color: @surface0; } - + /* Compare button & Cancel new branch button */ .idPXPh, .epAEYw { @@ -774,7 +790,7 @@ .col-md-8 { background-color: @base; } - + .user-mention, .team-mention { color: @accent-color; } @@ -877,7 +893,7 @@ background-image: none; background-color: @accent-color; } - + /* Keyboard hint */ .bdgUpN, .hZMmEi .TextInput-icon, .hZMmEi .TextInput-action { @@ -885,19 +901,19 @@ background-color: @mantle; border-color: @surface0; } - + /* Merge icon */ .fMJQEf { color: @text; background-color: @overlay0; } - + /* Branch indicator */ .iVNDSi { color: @accent-color; background-color: fade(@accent-color, 10); } - + /* File view */ .hwnsNO { color: @text; @@ -905,34 +921,34 @@ background: @mantle; } } - + .dXveNa[data-no-visuals="true"] { color: @subtext0; } - + .dXveNa, .kbjJSF { background-color: @surface0; border-color: @surface1; } - + .gUecKw, .lcpiaz, .jolsUx, .fsSggy { background-color: @mantle; } - + .Cxvmo, .dhYcqs { color: @red; } - + .byJIBD, .dMLfZp[data-size="small"][data-no-visuals="true"] svg { color: @green; } - + .lmmHGT:not(:first-of-type), .fOEJrA, .fnFdxN, @@ -951,18 +967,18 @@ .dTxwit { color: @subtext0; } - + .gssqTz { color: @text !important; } - + .bPgnBp, .jMyfUO, .hfRvxg, .cBrzIN { color: @text; } - + .eLaeIt:hover:not([disabled]), .dMLfZp[data-size="small"][data-no-visuals="true"]:hover:not([disabled]), .bqDKPR[data-component="IconButton"][data-no-visuals], @@ -970,11 +986,11 @@ .icOaJE:hover:not([disabled]) { background-color: @surface0; } - + .icOaJE[aria-pressed="true"] { background-color: @surface0; } - + .cZRqXf { background-color: @surface0; &:active:not([disabled]), @@ -986,7 +1002,7 @@ background-color: @surface1; } } - + .kdEavw, .ddNLNa, .jepClM, @@ -998,16 +1014,16 @@ background-color: @surface1 } } - + .juEfKr { border-color: @surface2; } - + .eUqMHM, .hSXtjz { background-color: @base; } - + .gtXnmh, .ukUXs, .giEfVQ, @@ -1016,7 +1032,7 @@ .kTUxDY { background-color: @mantle; } - + .hLwWNO .PRIVATE_TreeView-item-container, .hYaoHV, .rLhXz, @@ -1025,12 +1041,12 @@ .dEmXPQ { color: @text; } - + .bJBoUI, .iJtJJh { color: @accent-color; } - + .lhyFLG { background-color: @mantle; border-top: 1px solid @surface1; @@ -1038,23 +1054,23 @@ border-bottom-color: @surface1; border-left-color: @surface1; } - + .hUWqlv, .bJcMWH { color: @blue; } - + .gxGEao { border-bottom-color: @surface0; } - + .hLwWNO .PRIVATE_TreeView-item[aria-current="true"] > .PRIVATE_TreeView-item-container { background-color: @surface0; &::after { background-color: @accent-color; } } - + .dfAUyE, .gKuCoB, .bFrOJy { @@ -1063,7 +1079,7 @@ color: @text } } - + .cuqBaK, .fCAAcl, .dAXkSP { @@ -1073,13 +1089,13 @@ background: @surface0; } } - + @media (hover: hover) and (pointer: fine) { .rLhXz:hover:not([aria-disabled]) { background-color: @surface0; } } - + /* Projects */ .ksbilD, .cuaLcW, @@ -1096,7 +1112,7 @@ .AbCTW { background-color: @mantle; } - + .jEgFtJ, .lixtXZ:hover, .eNIoFu, @@ -1106,23 +1122,23 @@ .gIOnJa { background-color: @surface0; } - + .jBCpbB { color: @text; background-color: @surface0; } - + .kzrUhn.selected { background-color: @base; border-color: @surface0; color: @text; } - + .esIQoN, .kbjJSF:disabled { color: @subtext1; } - + .eJTCnd, .eTthoV { border-color: @surface0; @@ -1137,36 +1153,36 @@ color: @text; } } - + .ikTPpF { box-shadow: @base 0px 3px 6px; border-color: @surface0; } - + .cvveTk, .dwoION { background-color: @base; } - + .FKGWN { background-color: @base; border-color: @surface0; } - + .jEgFtJ::after { background-color: @accent-color; } - + .khCtfm:hover { background-color: @surface0; } - + .khCtfm, .khCtfm[data-component="leadingVisual"], .Tnbrt[data-component="IconButton"][data-no-visuals] { color: @subtext0; } - + .Tnbrt { &:active, &[aria-expanded="true"] { background-color: @surface2; @@ -1178,23 +1194,23 @@ .imsxCM { color: @text; - + .is-selected::after { background-color: @accent-color; } } - + .pxYjU { background-color: @mantle; color: @text; border-color: @surface0; } - + .ilLRrZ { color: @text; background-color: @surface1; } - + .cnIHxk { background-color: @surface0; color: @text; @@ -1203,11 +1219,11 @@ color: @crust; } } - + .ghFpol { background-color: @base; } - + .hVmCdl, .fqKZNC, .fZFWUy, @@ -1217,12 +1233,12 @@ .ekNmOn { color: @text; } - + .lixtXZ[data-component="IconButton"][data-no-visuals], .klUZzf:not(:first-of-type) { color: @subtext0; } - + .jvpWzR { &:hover { background-color: @surface1; @@ -1231,20 +1247,20 @@ color: @subtext0; } } - + .fZFWUy, .fzjwje { background-color: @base; } - + .cEYXBH { background-color: @accent-color; } - + .joxhcl, .hXyJIp, .fMkBhb > .segmentedControl-content { background-color: @mantle; } - + .dVFmxu, .gbKtit, .lnKxja, @@ -1258,7 +1274,7 @@ border-color: @surface0; } } - + .hJMtSk { color: @crust; background-color: @green; @@ -1267,7 +1283,7 @@ background-color: @overlay0; } } - + .iDiUTR { color: @text; background-color: @base; @@ -1276,12 +1292,12 @@ border-color: @surface1; } } - + .eQfJKc, .UHWYv { color: @red; } - + .jVIqnb { color: @red; background-color: @surface0; @@ -1290,15 +1306,15 @@ background-color: @red; } } - + .UHWYv:hover { background-color: fade(@red, 20) } - + .lmmHGT:hover { background-color: @surface0; } - + /* Project table view */ .hYdbWk, .gkeKEr, @@ -1315,13 +1331,13 @@ .dSHKOE { background-color: @base; } - + .gkWKRr { border-top-color: @surface0; border-right-color: @surface0; border-left-color: @surface0; } - + .hPQRKh { background-color: @surface0; &:hover:not([disabled]) { @@ -1331,7 +1347,7 @@ color: @subtext0; } } - + .kfwhFa { &:hover:not([disabled]) { background-color: @surface0; @@ -1340,17 +1356,17 @@ color: @subtext0; } } - + .jykkjb { background-color: @base; box-shadow: @crust 0px -2px 0px inset, @crust 0px 1px 0px inset; } - + .jhjELj, .ixTUPS { border-color: @surface1; } - + .gmscZx, .fUaEiu { &:hover:not([disabled]) { @@ -1365,15 +1381,15 @@ color: @subtext0; } } - + .cBssZb { color: @text; } - + .jhjELj::before { border-color: transparent transparent @surface1; } - + .fHpqaf, .bfQVnA, .iGxiw, @@ -1382,32 +1398,32 @@ .iQkwAM { color: @subtext0; } - + smt { background-color: @base; &:hover { background-color: @surface0; } } - + .dtTTcd { background-color: @base; &.hoverable:hover { background-color: @surface0; } } - + .pQcjM { border-color: @surface1; &.hoverable:hover { background-color: @surface0; } } - + .eTSXcP { background-color: @red; } - + .iGxiw { border-bottom-color: @surface1; }