8000 Add support for dark mode · Issue #403 · rtfpessoa/diff2html · GitHub
[go: up one dir, main page]

Skip to content

Add support for dark mode #403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mystiquewolf opened this issue Sep 17, 2021 · 10 comments · Fixed by #514
Closed

Add support for dark mode #403

mystiquewolf opened this issue Sep 17, 2021 · 10 comments · Fixed by #514

Comments

@mystiquewolf
Copy link

Step -1: Before filling an issue check out troubleshooting section

Step 0: Describe your environment

  • OS: Kubuntu 21.04
  • diff2html version: 3.4.11
  • Using diff2html directly or using diff2html-ui helper: Through VS Code Diff Viewer extension
  • Extra flags: _

Step 1: Describe the problem:

Feature request: Add support for dark mode via parameter and via prefers-color-scheme. Not sure if the latter can be done at this project or projects that use this project should detect the environment in some way and pass parameters.

Observed Results:

Dark mode not available in VS Code Diff viewer extension. caponetto/vscode-diff-viewer#36

Expected Results:

  • What did you expect to happen?
    -- Dark mode happens.
@rtfpessoa
Copy link
Owner

This should not be hard to implement, is mostly a matter of doing some CSS work and making it work with the dark highlight.js themes. Feel free to send a PR.

@Angelk90
Copy link
Angelk90 commented Mar 8, 2022

@mystiquewolf , @rtfpessoa : Are there any news?

If I put a background for example dark to the body this happens.

Schermata 2022-03-08 alle 19 36 16

@mystiquewolf
Copy link
Author

No news from me for now, i'm busy with other things, don't use this very frequently yet and lately I'm using light themes.

@Angelk90
Copy link
Angelk90 commented Mar 9, 2022

We hope @rtfpessoa can solve the problem.

@rtfpessoa
Copy link
Owner

No news on my side. It will probably need some more tweaks to work. Feel free to send a PR

@ananyf
Copy link
ananyf commented Apr 28, 2022

Hello @rtfpessoa
Can you use this lib https://darkmodejs.learn.uno/

@rtfpessoa
Copy link
Owner

That does not seem like a great solution. The solution should be done at the css level of this project.

@rtfpessoa
Copy link
Owner

I have no time to put on this, but if you are interested in working on a PR, feel free to ask for any guidance and I will help.

@JHWelch
Copy link
Contributor
JHWelch commented Sep 16, 2023

I've been working on this with a straight CSS solution, other than passing a config value to indicate light/dark/auto switch. I'm making progress, hopefully I should have a PR up relatively soon.

@bombillazo
Copy link
bombillazo commented Oct 8, 2023

Thanks for this feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
0