feat: add github style

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-08-05 18:37:26 +02:00
parent 8bff2bc47a
commit 9bd8f4c18a
Signed by: mfocko
SSH key fingerprint: SHA256:icm0fIOSJUpy5+1x23sfr+hLtF9UhY8VpMC7H4WFJP8
2 changed files with 104 additions and 0 deletions

View file

@ -2,6 +2,7 @@
## List of available styles
* [github](./github.user.css)
* [gitlab](./gitlab.user.css)
* [ismu](./ismu.user.css)
* [jira](./jira.user.css)

103
github.user.css Normal file
View file

@ -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 <me@mfocko.xyz>
@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;
}
}
}