question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for dark mode

See original GitHub issue

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. https://github.com/caponetto/vscode-diff-viewer/issues/36

Expected Results:

  • What did you expect to happen? – Dark mode happens.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:8
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ananyfcommented, Apr 28, 2022

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

0reactions
ngjupingcommented, Dec 1, 2022

these are some colors i have used: (scss + vue, v-deep here means affect nested HTML elements)

.dark.code-diff::v-deep {
  .d2h-code-side-linenumber,
  .d2h-info,
  .d2h-emptyplaceholder,
  .d2h-code-side-emptyplaceholder {
    background-color: #272822;
    color: #d0d0d0;
  }
  span {
    color: #d0d0d0;
  }

  .d2h-del {
    background-color: #7d4e50;
  }

  del {
    background-color: #a07c7e;
  }
  .d2h-ins {
    background-color: #748a74;
  }

  ins {
    background-color: #177016;
  }
}
Screenshot 2022-12-01 at 11 54 32 AM
Read more comments on GitHub >

github_iconTop Results From Across the Web

Supporting Dark Mode in Your Interface - Apple Developer
Supporting Dark Mode in Your Interface. Update colors, images, and behaviors so that your app adapts automatically when Dark Mode is active.
Read more >
Dark Mode: Adding support to your app in Swift - SwiftLee
Add Dark Mode support easily with best practices. Automatically make images and colors adapt to Dark Mode without making your app size ...
Read more >
Adapting Your App to Support Dark Mode - RayWenderlich.com
In this tutorial, you'll learn how to add support for Dark Mode in your app, making it look great in low-light environments.
Read more >
Dark Mode, Dark Theme: Adding Support to Your Application
Dark Mode colors will be imposed by iOS to any application that is linked against iOS 13 or later SDK and doesn't explicitly...
Read more >
Dark theme - Android Developers
Dark theme · Use the system setting (Settings -> Display -> Theme) to enable Dark theme. · Use the Quick Settings tile to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found