Skip to content

Commit

Permalink
Copy color-scheme from slide to <html>
Browse files Browse the repository at this point in the history
For slide indicator and other Inspire.js chrome
  • Loading branch information
LeaVerou committed Jun 26, 2024
1 parent bdd1167 commit 49aa2d5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/inspire.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ let _ = {
// Adjust font size to prevent scrolling
_.adjustFontSize();

// Adjust color-scheme of Inspire chrome
document.documentElement.style.setProperty("color-scheme", "");
document.documentElement.style.setProperty("color-scheme", getComputedStyle(slide).getPropertyValue("color-scheme"));

// Show or hide onscreen navigation
$("#onscreen-nav").classList.toggle("hidden", !slide.matches(".onscreen-nav"));

Expand Down

0 comments on commit 49aa2d5

Please sign in to comment.