cefsharp / CefSharp

.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework

Home Page:http://cefsharp.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request - Improve documentation to understand how to enable dark mode for ChromiumWebBrowser

ElektroStudios opened this issue · comments

Describe the solution you'd like
A clear and concise documentation article, FAQ entry, and/or a guided/automated public method in the CefSharp API that can let the non-advanced end-user to help him figure out and understand how to enable/disable dark mode on a ChromiumWebBrowser object.

For .NET Core Windows Forms and .NET Framework Windows Forms.

Additional context
I've opened this simple and detailed question in Stackoverflow, but I still can't get the help that I'm looking for...

My intention is that when loading a web page in the CEF-based browser, it will automatically be colored with a dark theme.

Or at least, and as a last resort, only a solution for websites that checks whether the web browser is using dark or light mode and then the website automatically adapts its colors.

Thanks in advance if someone could clear my doubts.

Checklist:

  • I have reviewed the CEF API and have confirmed the feature I'm requesting is possible.
  • The Feature I'm requesting is an improvement to Async Javascript Binding (No new feature are being added to the Sync Javascript binding)
  • An open PR exists on the CEF Pull Requests and I'd like to propose this feature is added to CefSharp when/if it's merged.

prefers-color-scheme is the only option that CEF officially supports.

I've updated #3955 (comment) to better document the options.

Forcing a website that doesn't not support a dark theme to display in a dark mode is not officially supported.