diff --git a/README.md b/README.md index 6e91478..760b7bd 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ## List of available styles +* [github](./github.user.css) * [gitlab](./gitlab.user.css) * [ismu](./ismu.user.css) * [jira](./jira.user.css) diff --git a/github.user.css b/github.user.css new file mode 100644 index 0000000..80b1159 --- /dev/null +++ b/github.user.css @@ -0,0 +1,103 @@ +/* ==UserStyle== +@name GitHub +@namespace git.mfocko.xyz/mfocko/usercss +@updateURL https://git.mfocko.xyz/mfocko/usercss/raw/branch/main/github.user.css +@version 1.7.10 +@description Switch monospace font and hide clutter. +@author mfocko +@preprocessor stylus +@var select monospace-font "Font" [ + "custom*", + "Berkeley Mono Variable", + "Cascadia Code NF", + "Comic Code Ligatures", + "Fira Code", + "Hack", + "IBM Plex Mono", + "Iosevka Term", + "Iosevka Term Slab", + "Iosevka Comfy", + "Pragmasevka", + "JetBrains Mono", + "JuliaMono", + "MonoLisa Variable", + "PragmataPro Liga", + "PragmataPro Mono Liga", + "Rec Mono Linear", + "Roboto Mono", + "SF Mono", + "Source Code Pro", + "Victor Mono", +] +@var text custom-font "Custom font" "monospace" +@var checkbox monospace-comments "Render comments in monospace font" 0 +@var checkbox all-the-way "Render everything in monospace font" 0 +@var text font-features "Font feature settings" "'calt' on, 'liga' on, 'dlig' on" + +@var checkbox hide-header "Hide header" 0 +@var checkbox hide-description-of-board-columns "Hide description of the board columns" 0 +==/UserStyle== */ + +if monospace-font=="custom" + monospace-font=custom-font + +@-moz-document domain("github.com"), +domain("githubusercontent.com") { + :root { + --fontStack-monospace: monospace-font; + } + + pre, + code, + kbd, + var, + tt, + .blob-code-inner, + .file-info, + .text-mono, + .commit-ref, + .blob-num, + .branch-name, + .commit .sha-block, + .commit .sha, + textarea, + .input-monospace, + .commit-tease-sha, + .react-code-text, + .react-blob-print-hide, + * [style *="monospace"], + .RyhEW, + .bMtKSj /* commit hash in the project view of issue */ { + font-family: monospace-font !important; + font-feature-settings: font-features; + } + + if monospace-comments { + .comment-body { + font-family: monospace-font !important; + font-feature-settings: font-features; + } + } + + if all-the-way { + * { + font-family: monospace-font !important; + font-feature-settings: font-features; + } + } + + if hide-header { + /* hide the header */ + .AppHeader { + display: none; + } + } + + if hide-description-of-board-columns { + .buxasC, .bVaayg, .VwkZl, .eTJVOt, .dWilAV, .iYtFrB, .haRXvJ, + .eUPYPv, + .fzxeh { + display: none; + } + } +}