Thinking on ways to solve a DARK/LIGHT THEME SWITCH
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
    
  
      
    
  
  
  
  
  
    
  
  
    
    
In today's GUI Challenge, @AdamArgyleInk shares thinking on a way to build a theme switch component. Often a website will allow switching the theme to something other than the system preference and these are thoughts on how to achieve that user experience.
Chapters:
- 0:00 - Introduction
- 0:30 - Overview
- 3:10 - Debugging Corner
- 3:36 - HTML
- 7:40 - SVG
- 8:59 - Mask
- 10:00 - Animations
- 11:51 - Theme Toggle CSS
- 15:35 - Sun and Moon CSS
- 19:37 - JavaScript
- 23:45 - Recap
Resources:
Watch more GUI Challenges → https://goo.gle/GUIchallenges
Subscribe to Google Chrome Developers → https://goo.gle/ChromeDevs 
arrow_back Back to all episodes
  
  
 
  
    
    
      
    
    
  
       
    
    
  
  
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2022-01-19 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-01-19 UTC."],[],[]]