You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/Appearance.md
+42-29Lines changed: 42 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,49 +2,42 @@ Appearance (Theme) API
2
2
===
3
3
4
4
# Background
5
-
This API's main use case is to set the overall appearance for WebView2. The options are similar to Edge: match the system default theme, light theme, or dark theme.
6
-
This API changes thing like the dialogs, menus, and so on that WebView2 displays itself as well as the **something** of web content. Please note this API will only set the overall appearance, but not theme.
7
-
For reference, in the screenshot below this API is meant to expose the Overall Appearance section as a WebView2 API.
8
-
9
-
# Conceptual pages (How To)
10
-
11
-
How to set theme in webview2.
12
-
1. Query interface. (Situational)
13
-
2. Call put_Appearance to set the Appearance property.
14
-
3. The input parameter can be either COREWEBVIEW2_APPEARANCE_TYPE_SYSTEM, COREWEBVIEW2_APPEARANCE_TYPE_LIGHT, or COREWEBVIEW2_APPEARANCE_TYPE_DARK.
5
+
This API's main use is to set the overall appearance for WebView2. The options are similar to Edge: match the system default theme, change to light theme, or change to dark theme.
6
+
This API has 2 main changes relevant to the end users. First, it sets appearance for WebView2 UI like dialogs, prompts, context menu, etc. And second, this API sets the ['prefers-color-scheme'](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)[media feature](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#media_features). Websites typically media query for this setting in order to set CSS themes for light/dark.
15
7
8
+
Please note this API will only set the overall appearance, but not theme.
9
+
For reference, in the screenshot below, this API is meant to expose the Overall Appearance section as a WebView2 API.
0 commit comments