From e9160ac0213e44255128846aaad758345a8ca1a0 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Sun, 30 Jul 2023 17:45:10 +0800 Subject: [PATCH] fix(github): various fixes and improvements --- styles/github/catppuccin.user.css | 414 ++++++++++++++++++------------ 1 file changed, 255 insertions(+), 159 deletions(-) diff --git a/styles/github/catppuccin.user.css b/styles/github/catppuccin.user.css index ec9fb1de50..4e1ba82678 100644 --- a/styles/github/catppuccin.user.css +++ b/styles/github/catppuccin.user.css @@ -44,7 +44,7 @@ @base: #eff1f5; @mantle: #e6e9ef; @crust: #dce0e8; - } + }; @frappe: { @rosewater: #f2d5cf; @flamingo: #eebebe; @@ -72,7 +72,7 @@ @base: #303446; @mantle: #292c3c; @crust: #232634; - } + }; @macchiato: { @rosewater: #f4dbd6; @flamingo: #f0c6c6; @@ -100,7 +100,7 @@ @base: #24273a; @mantle: #1e2030; @crust: #181926; - } + }; @mocha: { @rosewater: #f5e0dc; @flamingo: #f2cdcd; @@ -128,11 +128,10 @@ @base: #1e1e2e; @mantle: #181825; @crust: #11111b; - } -} + }; +}; @-moz-document regexp("https:\/\/(gist\.)*github\.com(?!\/(marketplace|organizations\/plan)).*") { - [data-color-mode="auto"][data-dark-theme*="light"], [data-color-mode="light"][data-light-theme*="dark"], [data-color-mode="light"][data-light-theme*="light"] { @@ -195,7 +194,7 @@ &, & body { - accent-color: @accent-color; + accent-color: @accent-color; --color-canvas-default-transparent: rgba(13, 17, 23, 0); --color-page-header-bg: @base; --color-marketing-icon-primary: @sky; @@ -357,12 +356,11 @@ --color-mktg-btn-shadow-outline: rgb(255, 255, 255 / 25%) 0 0 0 1px inset; --color-mktg-btn-shadow-focus: rgb(255, 255, 255 / 25%) 0 0 0 4px; --color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, 0.15), - 0 100px 80px rgba(255, 255, 255, 0.02), - 0 42px 33px rgba(255, 255, 255, 0.024), - 0 22px 18px rgba(255, 255, 255, 0.028), - 0 12px 10px rgba(255, 255, 255, 0.034), - 0 7px 5px rgba(255, 255, 255, 0.04), - 0 3px 2px rgba(255, 255, 255, 0.07); + 0 100px 80px rgba(255, 255, 255, 0.02), + 0 42px 33px rgba(255, 255, 255, 0.024), + 0 22px 18px rgba(255, 255, 255, 0.028), + 0 12px 10px rgba(255, 255, 255, 0.034), + 0 7px 5px rgba(255, 255, 255, 0.04), 0 3px 2px rgba(255, 255, 255, 0.07); --color-mktg-btn-shadow-hover-muted: rgb(255, 255, 255) 0 0 0 2px inset; --color-avatar-bg: rgba(255, 255, 255, 0.1); --color-avatar-border: rgba(240, 246, 252, 0.1); @@ -374,8 +372,7 @@ --color-select-menu-backdrop-border: #484f58; --color-select-menu-tap-highlight: rgba(48, 54, 61, 0.5); --color-select-menu-tap-focus-bg: #0c2d6b; - --color-overlay-shadow: 0 0 0 1px #30363d, - 0 16px 32px rgba(1, 4, 9, 0.85); + --color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1, 4, 9, 0.85); --color-header-text: var(--subtext2); --color-header-bg: @base; @@ -426,12 +423,13 @@ --color-btn-shadow-input-focus: 0 0 0 0.2em rgba(31, 111, 235, 0.3); --color-btn-counter-bg: @surface2; #coloredButton(primary, @green); - --color-btn-outline-text: #58a6ff; - --color-btn-outline-hover-text: #58a6ff; + --color-btn-outline-text: @accent-color; + --color-btn-outline-hover-text: @accent-color; --color-btn-outline-hover-bg: #30363d; --color-btn-outline-hover-border: rgba(240, 246, 252, 0.1); --color-btn-outline-hover-shadow: 0 1px 0 rgba(1, 4, 9, 0.1); - --color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03); + --color-btn-outline-hover-inset-shadow: inset 0 1px 0 + rgba(255, 255, 255, 0.03); --color-btn-outline-hover-counter-bg: rgba(255, 255, 255, 0.2); --color-btn-outline-selected-text: #ffffff; --color-btn-outline-selected-bg: #0d419d; @@ -480,49 +478,49 @@ --color-shadow-extra-large: 0 12px 48px @crust; --color-neutral-emphasis-plus: @overlay0; --color-neutral-emphasis: @overlay2; - --color-neutral-muted: rgba(110, 118, 129, 0.4); - --color-neutral-subtle: rgba(110, 118, 129, 0.1); + --color-neutral-muted: fade(@overlay2, 40); + --color-neutral-subtle: fade(@overlay2, 10); --color-accent-fg: @accent-color; --color-accent-emphasis: @accent-color; --color-accent-muted: fadeout(@accent-color, 60%); --color-accent-subtle: fadeout(@accent-color, 85%); --color-success-fg: @green; --color-success-emphasis: @green; - --color-success-muted: rgba(46, 160, 67, 0.4); - --color-success-subtle: rgba(46, 160, 67, 0.15); + --color-success-muted: fade(@green, 40); + --color-success-subtle: fade(@green, 15); --color-attention-fg: @peach; --color-attention-emphasis: @peach; - --color-attention-muted: rgba(187, 128, 9, 0.4); - --color-attention-subtle: rgba(187, 128, 9, 0.15); + --color-attention-muted: fade(@peach, 40); + --color-attention-subtle: fade(@green, 15); --color-severe-fg: @maroon; --color-severe-emphasis: @maroon; - --color-severe-muted: rgba(219, 109, 40, 0.4); - --color-severe-subtle: rgba(219, 109, 40, 0.15); + --color-severe-muted: fade(@maroon, 40); + --color-severe-subtle: fade(@maroon, 15); --color-danger-fg: @red; --color-danger-emphasis: @red; - --color-danger-muted: rgba(248, 81, 73, 0.4); - --color-danger-subtle: rgba(248, 81, 73, 0.15); + --color-danger-muted: fade(@red, 40); + --color-danger-subtle: fade(@red, 15); --color-open-fg: @green; --color-open-emphasis: @green; - --color-open-muted: rgba(46, 160, 67, 0.4); - --color-open-subtle: rgba(46, 160, 67, 0.15); + --color-open-muted: fade(@green, 40); + --color-open-subtle: fade(@green, 15); --color-closed-fg: @red; --color-closed-emphasis: @red; - --color-closed-muted: rgba(248, 81, 73, 0.4); - --color-closed-subtle: rgba(248, 81, 73, 0.15); + --color-closed-muted: fade(@red, 40); + --color-closed-subtle: fade(@red, 15); --color-done-fg: @mauve; --color-done-emphasis: @mauve; - --color-done-muted: rgba(163, 113, 247, 0.4); - --color-done-subtle: rgba(163, 113, 247, 0.15); + --color-done-muted: fade(@mauve, 40); + --color-done-subtle: fade(@mauve, 15); --color-sponsors-fg: @mauve; --color-sponsors-emphasis: @mauve; - --color-sponsors-muted: rgba(219, 97, 162, 0.4); - --color-sponsors-subtle: rgba(219, 97, 162, 0.15); + --color-sponsors-muted: fade(@mauve, 40); + --color-sponsors-subtle: fade(@mauve, 15); --color-primer-fg-disabled: fadeout(@accent-color, 50%); --color-primer-canvas-backdrop: rgba(1, 4, 9, 0.8); --color-primer-canvas-sticky: rgba(13, 17, 23, 0.95); - --color-primer-border-active: @red; - --color-primer-border-contrast: rgba(255, 255, 255, 0.2); + --color-primer-border-active: @accent-color; + --color-primer-border-contrast: fade(@accent-color, 20); --color-primer-shadow-highlight: 0 0 transparent; --color-primer-shadow-inset: 0 0 transparent; --color-primer-shadow-focus: 0 0 0 3px #0c2d6b; @@ -608,15 +606,15 @@ --color-scale-pink-7: #7d2457; --color-scale-pink-8: #5e103e; --color-scale-pink-9: #42062a; - --color-scale-coral-0: #FFDDD2; - --color-scale-coral-1: #FFC2B2; - --color-scale-coral-2: #FFA28B; - --color-scale-coral-3: #F78166; - --color-scale-coral-4: #EA6045; - --color-scale-coral-5: #CF462D; - --color-scale-coral-6: #AC3220; + --color-scale-coral-0: #ffddd2; + --color-scale-coral-1: #ffc2b2; + --color-scale-coral-2: #ffa28b; + --color-scale-coral-3: #f78166; + --color-scale-coral-4: #ea6045; + --color-scale-coral-5: #cf462d; + --color-scale-coral-6: #ac3220; --color-scale-coral-7: #872012; - --color-scale-coral-8: #640D04; + --color-scale-coral-8: #640d04; --color-scale-coral-9: #460701; } --color-workflow-card-connector: @overlay0; @@ -661,26 +659,28 @@ /* Buttons */ .btn-danger, .Button--danger { - background: var(--color-btn-danger-bg) + background: var(--color-btn-danger-bg); } - + /* Create PR button & New branch button */ - .iRoQzU, .ifkUYV, .bOZDzN { + .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 { @@ -702,20 +702,52 @@ .hx_IssueLabel not when (@lookup =latte) { --lightness-threshold: 0.453; --border-threshold: 0.96; - --border-fadeout: max(0, min(calc((var(--perceived-lightness) - var(--border-threshold)) * 100), 1)); //color: hsl(0deg, 0%, calc(var(--lightness-switch) * 100%)) !important; + --border-fadeout: max( + 0, + min( + calc((var(--perceived-lightness) - var(--border-threshold)) * 100), + 1 + ) + ); //color: hsl(0deg, 0%, calc(var(--lightness-switch) * 100%)) !important; color: var(--text) !important; - background: rgb(var(--label-r), var(--label-g), var(--label-b)) !important; - border-color: hsla(var(--label-h), calc(var(--label-s) * 1%), calc((var(--label-l) - 25) * 1%), var(--border-fadeout)) !important; + background: rgb( + var(--label-r), + var(--label-g), + var(--label-b) + ) !important; + border-color: hsla( + var(--label-h), + calc(var(--label-s) * 1%), + calc((var(--label-l) - 25) * 1%), + var(--border-fadeout) + ) !important; } .hx_IssueLabel when (@lookup =latte) { --lightness-threshold: 0.6; --background-fadeout: 0.18; --border-fadeout: 0.3; - --lighten-by: calc(((var(--lightness-threshold) - var(--perceived-lightness)) * 100) * var(--lightness-switch)); - color: hsl(var(--label-h), calc(var(--label-s) * 1%), calc((var(--label-l) + var(--lighten-by)) * 1%)) !important; - background: rgba(var(--label-r), var(--label-g), var(--label-b), var(--background-fadeout)) !important; - border-color: hsla(var(--label-h), calc(var(--label-s) * 1%), calc((var(--label-l) + var(--lighten-by)) * 1%), var(--border-fadeout)) !important; + --lighten-by: calc( + ((var(--lightness-threshold) - var(--perceived-lightness)) * 100) * + var(--lightness-switch) + ); + color: hsl( + var(--label-h), + calc(var(--label-s) * 1%), + calc((var(--label-l) + var(--lighten-by)) * 1%) + ) !important; + background: rgba( + var(--label-r), + var(--label-g), + var(--label-b), + var(--background-fadeout) + ) !important; + border-color: hsla( + var(--label-h), + calc(var(--label-s) * 1%), + calc((var(--label-l) + var(--lighten-by)) * 1%), + var(--border-fadeout) + ) !important; } /* Labels */ @@ -766,8 +798,9 @@ .col-md-8 { background-color: @base; } - - .user-mention, .team-mention { + + .user-mention, + .team-mention { color: @accent-color; } @@ -810,7 +843,7 @@ h4, h5, h6 { - color: @subtext1 + color: @subtext1; } body, @@ -843,7 +876,10 @@ } /* New change visibility box danger buttons Fix */ - :where(#repo-visibility-proceed-button-public, #repo-visibility-proceed-button-private):not([data-next-stage]) { + :where( + #repo-visibility-proceed-button-public, + #repo-visibility-proceed-button-private + ):not([data-next-stage]) { color: var(--color-btn-danger-text); background-color: var(--color-btn-danger-bg); } @@ -853,7 +889,6 @@ background-color: inherit; } - /* Footer Logo Fix */ .footer-octicon > svg:nth-child(1) > path:nth-child(1) { fill: @text; @@ -869,27 +904,28 @@ background-image: none; background-color: @accent-color; } - + /* Keyboard hint */ .bdgUpN, - .hZMmEi .TextInput-icon, .hZMmEi .TextInput-action { + .hZMmEi .TextInput-icon, + .hZMmEi .TextInput-action { color: @text; 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; @@ -897,34 +933,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, @@ -943,18 +979,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], @@ -962,12 +998,13 @@ .icOaJE:hover:not([disabled]) { background-color: @surface0; } - + .icOaJE[aria-pressed="true"] { background-color: @surface0; } - + .cZRqXf { + color: @text; background-color: @surface0; &:active:not([disabled]), &[aria-expanded="true"] { @@ -978,7 +1015,7 @@ background-color: @surface1; } } - + .kdEavw, .ddNLNa, .jepClM, @@ -987,19 +1024,19 @@ background-color: @surface0; &:hover:not([disabled]) { border-color: @surface2; - background-color: @surface1 + background-color: @surface1; } } - + .juEfKr { border-color: @surface2; } - + .eUqMHM, .hSXtjz { background-color: @base; } - + .gtXnmh, .ukUXs, .giEfVQ, @@ -1008,7 +1045,7 @@ .kTUxDY { background-color: @mantle; } - + .hLwWNO .PRIVATE_TreeView-item-container, .hYaoHV, .rLhXz, @@ -1017,12 +1054,12 @@ .dEmXPQ { color: @text; } - + .bJBoUI, .iJtJJh { color: @accent-color; } - + .lhyFLG { background-color: @mantle; border-top: 1px solid @surface1; @@ -1030,32 +1067,34 @@ 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 { + + .hLwWNO + .PRIVATE_TreeView-item[aria-current="true"] + > .PRIVATE_TreeView-item-container { background-color: @surface0; &::after { background-color: @accent-color; } } - + .dfAUyE, .gKuCoB, .bFrOJy { .segmentedControl-content { background-color: @mantle; - color: @text + color: @text; } } - + .cuqBaK, .fCAAcl, .dAXkSP { @@ -1065,13 +1104,13 @@ background: @surface0; } } - + @media (hover: hover) and (pointer: fine) { .rLhXz:hover:not([aria-disabled]) { background-color: @surface0; } } - + /* Projects */ .ksbilD, .cuaLcW, @@ -1088,7 +1127,7 @@ .AbCTW { background-color: @mantle; } - + .jEgFtJ, .lixtXZ:hover, .eNIoFu, @@ -1098,23 +1137,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; @@ -1129,38 +1168,39 @@ 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"] { + &:active, + &[aria-expanded="true"] { background-color: @surface2; } &:hover { @@ -1170,36 +1210,36 @@ .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; + background-color: @surface0; + color: @text; &:disabled { background-color: @overlay0; color: @crust; } } - + .ghFpol { background-color: @base; } - + .hVmCdl, .fqKZNC, .fZFWUy, @@ -1209,12 +1249,12 @@ .ekNmOn { color: @text; } - + .lixtXZ[data-component="IconButton"][data-no-visuals], .klUZzf:not(:first-of-type) { color: @subtext0; } - + .jvpWzR { &:hover { background-color: @surface1; @@ -1223,20 +1263,22 @@ color: @subtext0; } } - + .fZFWUy, .fzjwje { background-color: @base; } - + .cEYXBH { background-color: @accent-color; } - - .joxhcl, .hXyJIp, .fMkBhb > .segmentedControl-content { + + .joxhcl, + .hXyJIp, + .fMkBhb > .segmentedControl-content { background-color: @mantle; } - + .dVFmxu, .gbKtit, .lnKxja, @@ -1250,16 +1292,16 @@ border-color: @surface0; } } - + .hJMtSk { - color: @crust; - background-color: @green; + color: @crust; + background-color: @green; &:disabled { color: @crust; background-color: @overlay0; } } - + .iDiUTR { color: @text; background-color: @base; @@ -1268,12 +1310,12 @@ border-color: @surface1; } } - + .eQfJKc, .UHWYv { color: @red; } - + .jVIqnb { color: @red; background-color: @surface0; @@ -1282,15 +1324,15 @@ background-color: @red; } } - + .UHWYv:hover { - background-color: fade(@red, 20) + background-color: fade(@red, 20); } - + .lmmHGT:hover { background-color: @surface0; } - + /* Project table view */ .hYdbWk, .gkeKEr, @@ -1307,13 +1349,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]) { @@ -1323,7 +1365,7 @@ color: @subtext0; } } - + .kfwhFa { &:hover:not([disabled]) { background-color: @surface0; @@ -1332,17 +1374,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]) { @@ -1357,15 +1399,15 @@ color: @subtext0; } } - + .cBssZb { color: @text; } - + .jhjELj::before { border-color: transparent transparent @surface1; } - + .fHpqaf, .bfQVnA, .iGxiw, @@ -1374,39 +1416,93 @@ .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; } + + .gWjhfa, + .VgnWi, + .hPsWZB, + .bJYdrf:hover { + background-color: @mantle; + } + + .VgnWi:focus-within { + border-color: @accent-color; + box-shadow: @accent-color 0px 0px 0px 1px inset; + } + + .jMyfUO.selected { + background-color: @base; + } + + .hncMgh:hover:not([disabled]) { + background-color: @base; + border-color: fade(@base, 10); + } + + .PRIVATE_TreeView-directory-icon, + .PRIVATE_TreeView-item-visual { + color: @text; + } + + .bmmbtJ, + .emAvBH, + .fBAQFa { + color: @text; + } + + .haSIqu[data-no-visuals="true"] { + color: @green; + + &:hover:not([disabled]) { + background-color: transparent; + } + } + + .bHtxp, + .fBLtdA { + background-color: @surface0; + border-color: fade(@surface0, 10); + + &:focus-within { + box-shadow: @accent-color 0px 0px 0px 1px inset; + } + } + + .ikdrqw:checked { + background-color: @accent-color; + } } } -@-moz-document regexp("https:\/\/notebooks\.githubusercontent\.com\/view\/ipynb.*") { +@-moz-document regexp("https:\/\/notebooks\.githubusercontent\.com\/view\/ipynb.*") { :root { #catppuccin(@darkFlavor, @accentColor); } @@ -1523,15 +1619,15 @@ --color-scale-pink-7: #7d2457; --color-scale-pink-8: #5e103e; --color-scale-pink-9: #42062a; - --color-scale-coral-0: #FFDDD2; - --color-scale-coral-1: #FFC2B2; - --color-scale-coral-2: #FFA28B; - --color-scale-coral-3: #F78166; - --color-scale-coral-4: #EA6045; - --color-scale-coral-5: #CF462D; - --color-scale-coral-6: #AC3220; + --color-scale-coral-0: #ffddd2; + --color-scale-coral-1: #ffc2b2; + --color-scale-coral-2: #ffa28b; + --color-scale-coral-3: #f78166; + --color-scale-coral-4: #ea6045; + --color-scale-coral-5: #cf462d; + --color-scale-coral-6: #ac3220; --color-scale-coral-7: #872012; - --color-scale-coral-8: #640D04; + --color-scale-coral-8: #640d04; --color-scale-coral-9: #460701; --jp-border-color0: var(--color-scale-gray-7); @@ -1633,4 +1729,4 @@ --jp-icon-contrast-color2: var(--color-scale-pink-6); --jp-icon-contrast-color3: var(--color-scale-blue-6); } -} \ No newline at end of file +}