Add theme support to code viewer

Dark mode is great but it’ll never met everyone’s expectations and preferences exactly, as light theme never did. I’ve seen many comments in the likes of “dark mode with lighter background”, “dark mode with more contrast”, etc.

Personally for me, dark mode looks great except for the code viewer (didn’t like the light version either, to be honest). The current theme is not one for me, sadly. People are used to Atom, Sublime Text, VS Code and other editors having tons of themes.

GitHub’s Atom already has an immense theme repository and it’s written in web friendly languages. So, what about bringing those themes to the GitHub code viewer on the web? I’m pretty sure this would tick all the boxes for most people in terms of customization.

1 Like

@jrhames thanks for taking the time to share your detailed feedback! As you mentioned, we’re getting all kinds of “goldilocks” feedback with our current dark theme contrast and colors. But the good news is that this is really just the beginning of themes for us and so we’re listening to all of our community’s feedback to help us understand how we can continue to create more inclusive themes in the future!

1 Like

upvote on theme support.

I truly appreciate the new dark mode style, it significantly reduces my context switch from code editor to code review (Pull Requests, otherwise using github for portable code sharing).

However, the code syntax highlighting is still a nontrivial context switch.
Please add support for UGC theme generation (preferably with GitHub>repository file/Project>User layered override/fallback). The community will optimize much faster than GitHub doing it internally.

If the concern is for branding, then keep the current Light/Dark/etc for the brand elements and limit UGC to the area inside the code display/editor elements

If the concern is for accessibility and support/quality-control, then ensure the declarations are portable instead of directly tied to current html classes (pl-en pl-kos pl-s1 pl-c1) etc. see editorconfig project as a sample project for portable configuration (though that project is currently anti-color-theming) and any number of editor’s proprietary configuration for mapping language elements to colors.

1 Like