Skip to main content
7 of 7
added 3 characters in body
muru
  • 8.2k
  • 1
  • 26
  • 47

Here's a userstyle I threw together that should fix both sans-serif and monospace. It also fixes hardcoded fonts within textareas and codeblocks that don't use the font variables for some reason. This should work in both Stylus (tested) and Stylish (untested).

@-moz-document domain("stackoverflow.com"), domain("stackexchange.com"), domain("askubuntu.com"), domain("superuser.com"), domain("serverfault.com"), domain("stackapps.com"),
domain("mathoverflow.net") {
body {
    --ff-sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
    --ff-mono: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif;
}

code, .s-prose code, pre.s-code-block, textarea.wmd-input, textarea#wmd-input, .full-diff .content {
    font-family: var(--ff-mono);
}

.top-bar, .topbar-dialog, #user-menu, .topbar-dialog .header h3 a, .topbar-dialog .pinned-site-editor-container .remove-pinned-site-link a, .topbar-dialog .modal-content .message-text h4 {
    font-family: var(--ff-sans) !important;
}
}

https://gist.github.com/SuperStormer/60a5e5c7e9549e9ed865a579df6f11be