2024-08-05 18:40:09 +02:00
|
|
|
/* ==UserStyle==
|
|
|
|
@name Forgejo / Gitea
|
|
|
|
@namespace git.mfocko.xyz/mfocko/usercss
|
|
|
|
@updateURL https://git.mfocko.xyz/mfocko/usercss/raw/branch/main/forgejo.user.css
|
2024-11-05 16:19:36 +01:00
|
|
|
@version 1.6.8
|
2024-08-05 18:40:09 +02:00
|
|
|
@description Switch monospace font and allow to hide diff highlight.
|
|
|
|
@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 diff-highlight "Show diff highlighting" 1
|
|
|
|
@var text font-features "Font feature settings" "'calt' on, 'liga' on, 'dlig' on"
|
|
|
|
@var checkbox monospace-comments "Render comments in monospace font" 0
|
|
|
|
@var checkbox all-the-way "Render everything in monospace font" 0
|
|
|
|
==/UserStyle== */
|
|
|
|
|
|
|
|
if monospace-font=="custom"
|
|
|
|
monospace-font=custom-font
|
|
|
|
|
|
|
|
@-moz-document domain("git.mfocko.xyz"),
|
|
|
|
domain("git.almalinux.org"),
|
|
|
|
domain("codeberg.org"),
|
|
|
|
domain("next.forgejo.org") {
|
|
|
|
* {
|
|
|
|
--fonts-monospace: monospace-font !important;
|
|
|
|
font-feature-settings: font-features;
|
|
|
|
}
|
|
|
|
|
|
|
|
if monospace-comments {
|
|
|
|
.comment-content,
|
2024-11-05 16:19:36 +01:00
|
|
|
.comment-body,
|
|
|
|
.markdown-text-editor {
|
2024-08-05 18:40:09 +02:00
|
|
|
font-family: monospace-font !important;
|
|
|
|
font-feature-settings: font-features;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.code-diff-split .del-code .lines-code-old,
|
|
|
|
.code-diff-split .del-code .lines-num-old,
|
|
|
|
.code-diff-split .del-code .lines-type-marker-old,
|
|
|
|
.code-diff-unified .del-code,
|
|
|
|
.code-diff-unified .del-code td,
|
|
|
|
.code-diff-split .add-code .lines-code-new,
|
|
|
|
.code-diff-split .add-code .lines-num-new,
|
|
|
|
.code-diff-split .add-code .lines-type-marker-new,
|
|
|
|
.code-diff-split .del-code .add-code.lines-code-new,
|
|
|
|
.code-diff-split .del-code .add-code.lines-num-new,
|
|
|
|
.code-diff-split .del-code .add-code.lines-type-marker-new,
|
|
|
|
.code-diff-unified .add-code,
|
|
|
|
.code-diff-unified .add-code td {
|
|
|
|
if !diff-highlight {
|
|
|
|
background: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if all-the-way {
|
|
|
|
* {
|
|
|
|
font-family: monospace-font !important;
|
|
|
|
font-feature-settings: font-features;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@-moz-document regexp("^https://.*git\\.mfocko\\.xyz.*\\.(patch|diff)$"),
|
|
|
|
regexp("^https://.*git\\.almalinux\\.org.*\\.(patch|diff)$"),
|
|
|
|
regexp("^https://.*codeberg\\.org.*\\.(patch|diff)$"),
|
|
|
|
regexp("^https://.*next\\.forgejo\\.org.*\\.(patch|diff)$"){
|
|
|
|
* {
|
|
|
|
font-family: monospace-font !important;
|
|
|
|
font-feature-settings: font-features;
|
|
|
|
}
|
|
|
|
}
|