facelessuser / MarkdownPreview

Markdown preview and build plugin for Sublime Text https://facelessuser.github.io/MarkdownPreview/
Other
405 stars 53 forks source link

GitHub dark theme #119

Closed npanuhin closed 7 months ago

npanuhin commented 3 years ago

Hello! A few days ago, GitHub released the dark theme!

Since this plugin is often used to preview the result before publishing it, it would be very handy if a dark theme was implemented here as well.

I opened the css folder and found that you have your own CSS files to style the GitHub API output. So creating the second optional css/github_dark.css file is just a matter of time, am I right? :wink:

facelessuser commented 3 years ago

It is certainly possible. I'd have to look into how difficult this would be. I know we sourced most of the CSS from a repo that scraped the store from GitHub, so if they have something that includes the dark theme as well, we could leverage that.

npanuhin commented 3 years ago

Okay, got it. Which repository are you talking about?

facelessuser commented 3 years ago

IIRC: https://github.com/sindresorhus/github-markdown-css

facelessuser commented 3 years ago

We add a little on top of it I think, but overall, we used what was provided in that repo.

Mohammad9760 commented 10 months ago

Hi... so I also would like to build md to html with a darktheme. any progress here?

facelessuser commented 10 months ago

TBH, it's been a pretty low priority, and it slipped my mind. It's probably worth looking into again though.

facelessuser commented 7 months ago

I am finally getting around to this. It will respond to your system theme.

Screenshot 2024-01-14 at 1 21 34 PM
facelessuser commented 7 months ago

Closed by: https://github.com/facelessuser/MarkdownPreview/commit/d5376c64b2065c95f90e8f614527f5ae4c23e39c

npanuhin commented 7 months ago

It works great, thank you! Maybe we can also add a manually configurable option in the package settings, or even a switch/toggle button in the rendered HTML that toggles between light/dark modes? Changing the entire browser theme back and forth just to test how my markdown page looks in different modes is kinda overkill)

facelessuser commented 7 months ago

You can open a new issue and I can look into some solution.