Skip to content

Instantly share code, notes, and snippets.

@ian-h-chamberlain
Last active October 31, 2024 01:05
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.1
@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, .commit-ref {
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