Skip to content

Instantly share code, notes, and snippets.

@ivan
Last active August 31, 2016 22:08
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 ivan/e1e655d8a60274d29636533631644d59 to your computer and use it in GitHub Desktop.
Save ivan/e1e655d8a60274d29636533631644d59 to your computer and use it in GitHub Desktop.
Fix styles on github.com and gist.github.com
// ==UserScript==
// @name GitHub: Fix styles
// @namespace github_styles
// @include *://github.com/*
// @include *://gist.github.com/*
// @version 1
// @grant GM_addStyle
// ==/UserScript==
// Note: colors are calibrated for a TN panel at low brightness, redshift -O 4500
GM_addStyle(`
/* Darker text */
body, .blob-code-inner {
color: #000;
}
.pl-c {
/* Code comments */
color: #5a5a5a;
}
.blob-num {
/* Darker line numbers */
color: rgba(0,0,0,0.5);
}
.repository-meta {
/* Slightly darker repository description */
color: #4e4e4e;
}
.pinned-repo-link .repo-description,
.mini-repo-list-item .repo-description {
/* Slightly darker repo description text (e.g. on user profile page) */
color: #3c3c3c;
}
/* Darker commit messages in file table,
Darker text in blockquotes
*/
table.files td.message a,
.markdown-body blockquote {
color: #636363;
}
.commit-desc pre {
color: #1e2123;
}
.full-commit .commit-desc pre {
font-size: 10.5pt;
}
.markdown-body pre {
/* Don't mess with the font size */
font-size: inherit;
}
.blob-code-inner, .blob-num {
/* Slightly bigger code font */
font-size: 10.5pt;
}
.markdown-body {
/* Smaller font size to match the rest of the page */
font-size: inherit;
}
h1 {
/* Smaller h1 (issue title) and maybe elsewhere */
font-size: 24px;
}
.gh-header-title {
/* Slightly higher line-height */
line-height: 1.3;
}
`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment