simov / markdown-viewer

Markdown Viewer / Browser Extension
MIT License
1.05k stars 133 forks source link

Update GitHub Dark theme to be the same as github.com #137

Closed hyrious closed 1 year ago

hyrious commented 3 years ago

Since GitHub has its own dark mode, I would like the dark theme in this extension be the same.

After checking your themes folder, I have no idea of how to edit the css file :/

So I just put my recent repo here! https://github.com/hyrious/github-markdown-css

Hope it helps.

simov commented 3 years ago

I was trying to do that myself for the last release of Markdown Viewer. Is the process fully automated? This is very important because styles change over time and maintaining this in the long run should be easy.

hyrious commented 3 years ago

You can treat the css file in my repo to never have chance to be changed again unless GitHub itself changed some colors some day. It is still there because Sindre Sorhus does not come up with updating his own repo.

In the long run, sindresorhus/github-markdown-css is a good place to track the github theme which is even published as an NPM package. You can use his css to generate your theme file fully automated.

simov commented 3 years ago

I am using that exact repo to generate the default GitHub theme here. Then I have a few style overrides of my own just have the GitHub Dark theme in this extension.

Your solution is a good starting point and I will consider it, but I would definitely prefer to have that fully automated.

All unminified themes are here https://github.com/simov/markdown-themes if you are curious. The GitHub one is generated using sindresorhus/github-markdown-css.

simov commented 1 year ago

Markdown Viewer v5 got released with the 'official' GitHub dark theme from sindresorhus. It is available on the Chrome Web Store and in the releases section here.