Last active
March 26, 2021 04:19
-
-
Save mmis1000/95f29ba3c7ff513536eb81ae52e11fb5 to your computer and use it in GitHub Desktop.
Sane github dark theme text color
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==UserStyle== | |
@name Sane github dark theme text color | |
@namespace mmis1000.me | |
@version 0.0.4 | |
@license CC0 | |
@updateURL https://gist.githubusercontent.com/mmis1000/95f29ba3c7ff513536eb81ae52e11fb5/raw/GithubDarkThemePatch.user.css | |
@preprocessor stylus | |
@var select theme "Theme" ["near_white:Near White", "pure_white:Pure white", "whiter:Whiter"] | |
==/UserStyle== */ | |
@-moz-document domain('github.com') { | |
[data-color-mode="dark"][data-dark-theme*="dark"] { | |
if theme == pure_white { | |
--color-text-primary: #fff; | |
--color-text-secondary: #f2f2f2; | |
--color-text-tertiary: #eee; | |
} else if theme == near_white { | |
--color-text-primary: #eee; | |
--color-text-secondary: #e7e7e7; | |
--color-text-tertiary: #e3e3e3; | |
} else if theme == whiter { | |
--color-text-primary: #dbdbdb; | |
--color-text-secondary: #d3d3d3; | |
--color-text-tertiary: #ccc; | |
} | |
if theme == pure_white { | |
--color-text-link: #76b7ff; | |
} else if theme == near_white { | |
--color-text-link: #6aa5e6; | |
} else if theme == whiter { | |
--color-text-link: #67a0e0; | |
} | |
--color-text-placeholder: #888; | |
if theme == pure_white { | |
--color-text-white: #fff; | |
} else if theme == near_white { | |
--color-text-white: #eee; | |
} else if theme == whiter { | |
--color-text-white: #dbdbdb; | |
} | |
--color-input-border: #373737; | |
--color-border-secondary: #2f2f2f; | |
--color-border-primary: #373737; | |
--color-btn-text: #ddd7d7; | |
--color-btn-outline-text: #b4d6ff; | |
--color-btn-outline-hover-text: #d5e8ff; | |
--color-btn-primary-bg: #1a6629; | |
--color-btn-primary-border: #227532; | |
--color-underlinenav-icon: #c2c9d0; | |
--color-underlinenav-text: #c2c9d0; | |
--color-underlinenav-counter-text: #c2c9d0; | |
--color-underlinenav-text-hover: #dde2e8; | |
--color-avatar-border: rgba(49, 52, 55, 0.27); | |
} | |
/* reference hightlight */ | |
[data-color-mode="dark"][data-dark-theme="dark_dimmed"] .pl-token.active, | |
[data-color-mode="dark"][data-dark-theme="dark_dimmed"] .pl-token:hover { | |
background: #554800; | |
text-shadow: 0 0 2px black; | |
} | |
/* reference hightlight */ | |
[data-color-mode="dark"][data-dark-theme="dark"] .pl-token.active, | |
[data-color-mode="dark"][data-dark-theme="dark"] .pl-token:hover { | |
background: #483d00; | |
text-shadow: 0 0 2px black; | |
} | |
@supports (-moz-appearance:none) { | |
/* scrollbar patch up */ | |
:is([data-color-mode="dark"][data-dark-theme*="dark"]), | |
:is([data-color-mode="dark"][data-dark-theme*="dark"] *) { | |
scrollbar-color: #6a6a6a #262626; | |
} | |
/* checkbox patch up */ | |
[data-color-mode="dark"][data-dark-theme*="dark"] input[type=checkbox] { | |
-moz-appearance: none; | |
position: relative; | |
width: 13px; | |
height: 13px; | |
background: #262626; | |
border-radius: 2px; | |
box-sizing: border-box; | |
border: 1px solid #777; | |
display: inline-block; | |
vertical-align: middle; | |
line-height: 11px; | |
text-align: center; | |
color: #262626; | |
} | |
[data-color-mode="dark"][data-dark-theme*="dark"] input[type=checkbox]:hover { | |
border: 1px solid #d7d7d7; | |
} | |
[data-color-mode="dark"][data-dark-theme*="dark"] input[type=checkbox]:checked { | |
background: #cacaca; | |
border: 1px solid #cacaca; | |
} | |
[data-color-mode="dark"][data-dark-theme*="dark"] input[type=checkbox]:checked:hover { | |
background: #d7d7d7; | |
} | |
[data-color-mode="dark"][data-dark-theme*="dark"] input[type=checkbox]:checked:after { | |
display: block; | |
width: 100%; | |
height: 100%; | |
content: " "; | |
background-size: 100% 100%; | |
/* background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path stroke="rgb(38,38,38)" stroke-width="18" d="M 10 50 L 40 80 L 90 30" fill="transparent"/></svg>'); */ | |
background-image: url('data:image/svg+xml;utf8,%3Csvg%20width=%22100%22%20height=%22100%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath%20stroke=%22rgb(38,38,38)%22%20stroke-width=%2218%22%20d=%22M%2010%2050%20L%2040%2080%20L%2090%2030%22%20fill=%22transparent%22/%3E%3C/svg%3E'); | |
} | |
[data-color-mode="dark"][data-dark-theme*="dark"] input[type=checkbox]:indeterminate:after { | |
display: block; | |
width: 100%; | |
height: 100%; | |
content: " "; | |
background-size: 100% 100%; | |
/* background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path stroke="rgb(119,119,119)" stroke-width="18" d="M 10 50 L 90 50" fill="transparent"/></svg>'); */ | |
background-image: url('data:image/svg+xml;utf8,%3Csvg%20width=%22100%22%20height=%22100%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath%20stroke=%22rgb(119,119,119)%22%20stroke-width=%2218%22%20d=%22M%2010%2050%20L%2090%2050%22%20fill=%22transparent%22/%3E%3C/svg%3E'); | |
} | |
[data-color-mode="dark"][data-dark-theme*="dark"] input[type=checkbox]:indeterminate:hover:after { | |
display: block; | |
width: 100%; | |
height: 100%; | |
content: " "; | |
background-size: 100% 100%; | |
/* background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path stroke="rgb(215,215,215)" stroke-width="18" d="M 10 50 L 90 50" fill="transparent"/></svg>'); */ | |
background-image: url('data:image/svg+xml;utf8,%3Csvg%20width=%22100%22%20height=%22100%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath%20stroke=%22rgb(215,215,215)%22%20stroke-width=%2218%22%20d=%22M%2010%2050%20L%2090%2050%22%20fill=%22transparent%22/%3E%3C/svg%3E'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment