Skip to content

Commit

Permalink
Advertise the color scheme based on the theme (#16301)
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed May 14, 2024
1 parent de4fef3 commit 4545de3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/apputils-extension/src/themesplugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ export const themesPlugin: JupyterFrontEndPlugin<IThemeManager> = {
manager.isLight(currentTheme)
);
document.body.dataset.jpThemeName = currentTheme;
document.body.style.colorScheme = manager.isLight(currentTheme)
? 'light'
: 'dark';
if (
document.body.dataset.jpThemeScrollbars !==
String(manager.themeScrollbars(currentTheme))
Expand Down

0 comments on commit 4545de3

Please sign in to comment.