Skip to content

Instantly share code, notes, and snippets.

@ian-h-chamberlain
Last active June 21, 2024 15:43
Show Gist options
  • Save ian-h-chamberlain/3e3a862f0b95e2429839231080fde7bd to your computer and use it in GitHub Desktop.
Save ian-h-chamberlain/3e3a862f0b95e2429839231080fde7bd to your computer and use it in GitHub Desktop.
GitHub Custom Fonts: forked from https://github.com/StylishThemes/GitHub-Dark

GitHub Custom Fonts

This is a super-simple fork of the GitHub Custom Fonts userstyle from https://github.com/StylishThemes/GitHub-Dark, with some slight tweaks and improvements.

Installation

First install a UserCSS extension like Stylus.

Click the [Raw] button on github-custom-fonts.user.css to open the Stylus installation dialog.

/* ==UserStyle==
@name GitHub Custom Fonts
@namespace https://github.com/ian-h-chamberlain
@version 1.0.0
@description Customize the font used for code on GitHub. Forked from https://github.com/StylishThemes/GitHub-Dark.
@homepageURL https://gist.github.com/ian-h-chamberlain/3e3a862f0b95e2429839231080fde7bd
@updateURL https://gist.github.com/ian-h-chamberlain/3e3a862f0b95e2429839231080fde7bd/raw/github-custom-fonts.user.css
@license BSD-2-Clause
@author ian-h-chamberlain
@preprocessor default
@advanced text ghd-font-family "Code font" Menlo
@advanced text ghd-font-feature-settings "Code font feature Settings" normal
@advanced text ghd-font-variant-ligatures "Code font ligature Settings" normal
@advanced text ghd-font-size "Code font size" 12px
==/UserStyle== */
@-moz-document regexp("^https?://((education|gist|graphql|guides|raw|resources|status|developer|support|vscode-auth)\\.)?github\\.com/((?!generated_pages/preview).)*$"), regexp("^https?://www\.zuora\.com.*github\.com.*"), domain("githubusercontent.com"), domain("www.githubstatus.com"), domain("stylishthemes.github.io") {
pre, code, tt, kbd:not(.badmono), samp, .blob-code, .file-data pre, .line-data,
#gist-form .file .input textarea, .blob-code-inner, .react-code-text, .jujkut,
#read-only-cursor-text-area, .react-blob-print-hide {
font-family: var(--ghd-font-family), Consolas, "Liberation Mono", Menlo, Courier, monospace !important;
font-feature-settings: var(--ghd-font-feature-settings);
font-variant-ligatures: var(--ghd-font-variant-ligatures);
font-size: var(--ghd-font-size) !important;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment