Skip to content

Instantly share code, notes, and snippets.

@Vivelin
Last active November 29, 2022 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vivelin/0f7a88e322c7608296c4d6cc254d3316 to your computer and use it in GitHub Desktop.
Save Vivelin/0f7a88e322c7608296c4d6cc254d3316 to your computer and use it in GitHub Desktop.
System Font Replacer user style
/* ==UserStyle==
@name System Font Replacer
@namespace vivelin.net
@version 1.0.3
@description Overrides sites using system fonts to use your own configured font preferences, especially for user-generated content.
@author Vivelin
@updateURL https://gist.githubusercontent.com/Vivelin/0f7a88e322c7608296c4d6cc254d3316/raw/system-font-replacer.user.css
==/UserStyle== */
/*
* Motivation: a lot of websites use boring or ugly system fonts, which
* is especially noticable for user-generated content on sites like
* Wikipedia. Most people using custom user styles probably have their
* font preferences configured already, so this style just overrides
* certain sites to use those configured fonts.
*/
@-moz-document domain("github.com") {
/* READMEs, comments, etc. */
.markdown-body {
font-family: sans-serif, 'Segoe UI Emoji';
}
/* Code blocks and inline code */
tt,
code,
samp,
pre,
.blob-code-inner {
font-family: monospace, 'Segoe UI Emoji';
}
}
@-moz-document domain("stackexchange.com"),
domain("stackoverflow.com"),
domain("superuser.com") {
html,
body {
--ff-sans: sans-serif, 'Segoe UI Emoji';
--ff-serif: serif, 'Segoe UI Emoji';
--ff-mono: monospace, 'Segoe UI Emoji';
}
}
@-moz-document domain("dev.to") {
html,
body {
--ff-sans-serif: sans-serif, 'Segoe UI Emoji';
--ff-serif: serif, 'Segoe UI Emoji';
--ff-monospace: monospace, 'Segoe UI Emoji';
}
}
@-moz-document domain("5e.tools") {
body,
.stats--book {
font-family: sans-serif, 'Segoe UI Emoji';
}
.stats--book p {
font-family: serif, 'Segoe UI Emoji';
font-size: 1.2em;
}
}
@-moz-document domain("gamefaqs.gamespot.com") {
body {
font-family: sans-serif, 'Segoe UI Emoji';
}
}
@-moz-document domain("dev.azure.com") {
.monospaced-text {
font-family: monospace, 'Segoe UI Emoji';
}
}
@-moz-document domain("wiki.guildwars2.com") {
div#globalWrapper,
input,
select,
h3,
#bodyContent > h3 {
font-family: sans-serif, 'Segoe UI Emoji';
}
}
@-moz-document domain("reddit.com") {
._292iotee39Lmt0MkQZ2hPV {
font-family: sans-serif, 'Segoe UI Emoji';
}
}
@-moz-document domain("google.com") {
.std, .g, .MBeuO, .e9EfHf, .gsfi, .lst, .GLcBOb {
font-family: sans-serif, 'Segoe UI Emoji';
}
}
@-moz-document domain("dndbeyond.com") {
body {
font-family: sans-serif, 'Segoe UI Emoji';
}
}
@-moz-document domain("fandom.com") {
.page .mw-parser-output > :is(p, ul) {
font-family: serif, serif, 'Segoe UI Emoji';
font-size: 1.125rem;
}
}
@-moz-document domain("www.nu.nl") {
:root {
--primary-font-family: serif;
}
}
@-moz-document domain("learn.microsoft.com") {
code {
font-family: monospace;
}
.hljs-comment {
font-style: italic;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment