Skip to content

Instantly share code, notes, and snippets.

@alexchexes
Last active April 9, 2026 19:58
Show Gist options
  • Select an option

  • Save alexchexes/e62fd2f5feb7084fc2611444075f2d06 to your computer and use it in GitHub Desktop.

Select an option

Save alexchexes/e62fd2f5feb7084fc2611444075f2d06 to your computer and use it in GitHub Desktop.
CSS to make Markdown on GitHub.com more readable
/*
CSS I use to make GitHub.com-rendered markdown more readable by adding distinct color to inline code and section titles.
The most convenient way is to use it with Stylus: https://github.com/openstyles/stylus
Screenshot + updatable version for Stylus:
https://userstyles.world/style/27510
*/
/* DARK THEMES */
[data-color-mode="dark"] .markdown-body :not(pre):not(a) > code {
color: #eab38a !important;
}
[data-color-mode="dark"] .markdown-body h1,
[data-color-mode="dark"] .markdown-body h2,
[data-color-mode="dark"] .markdown-body h3,
[data-color-mode="dark"] .markdown-body h4,
[data-color-mode="dark"] .markdown-body h5,
[data-color-mode="dark"] .markdown-body h6 {
color: #ffcc6d;
}
[data-color-mode="dark"] .markdown-body ol > li::marker {
color: #ffebc5;
}
/* LIGHT THEMES */
[data-color-mode="light"] .markdown-body :not(pre):not(a) > code,
[data-color-mode="light"] .markdown-body h1,
[data-color-mode="light"] .markdown-body h2,
[data-color-mode="light"] .markdown-body h3,
[data-color-mode="light"] .markdown-body h4,
[data-color-mode="light"] .markdown-body h5,
[data-color-mode="light"] .markdown-body h6 {
color: #0036bb;
}
@alexchexes

alexchexes commented Apr 9, 2026

Copy link
Copy Markdown
Author
chrome_2026-04-09--16-44-50--032

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment