Skip to content

Sync A Website Or Webpage Theme With OS's Preferred Color Scheme, Dark Mode, And Light Mode using only CSS. We can call this feature CSS Automatic Night Mode And Day Mode By OS Color Setting. As you can see, without any page refresh, my website automatically switches by my OS setting between Dark Mode And Light Mode. With a CSS Media query...

License

saeedkohansal/Sync-Website-Theme-With-OS-Dark-Mode-And-Light-Mode-CSS-Only-Trick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How To Sync Website Theme With OS Dark Mode And Light Mode

How To Sync Website Theme With OS Dark Mode And Light Mode - CSS Automatic Night Mode And Day Mode

YouTube Thumbnail

I will show you how to Sync A Website Or Webpage Theme With OS's Preferred Color Scheme, Dark Mode, And Light Mode using only CSS. We can call this feature CSS Automatic Night Mode And Day Mode By OS Color Setting. As you can see, without any page refresh, my website automatically switches by my OS setting between Dark Mode And Light Mode. With a simple CSS Media query, we can detect if the user has set their system to use a light or dark color theme. This CSS trick works on most Desktop and Mobile Devices that support Dark Mode And Light Mode features. Also, I'm gonna show you how you can detect a user's color scheme mode by CSS and display it on a Web page. If you want the theme to change smoothly, just add a CSS transition property for the body selector.

Video Tutorial [ Sync Website Theme With OS Theme Mode ]

https://youtu.be/8WdJuPdz4w0

 

If You Enjoy My Content, Please Support Me 😍🙏

💙 PAYPAL DONATION

https://paypal.me/gilgeekify

❤️ PATREON

https://www.patreon.com/gilgeekify

💛 BUY ME A COFFEE

https://www.buymeacoffee.com/gilgeekify

🪙 My Public Address To Receive BTC • Bitcoin

bc1qerc5ev074cqknu9nz589w4vjf5ecmhuc2df83h

🥈 My Public Address To Receive ETH • Ethereum

0x566A47B9731209A5144336D274D44224bfb9C0ea

About

Sync A Website Or Webpage Theme With OS's Preferred Color Scheme, Dark Mode, And Light Mode using only CSS. We can call this feature CSS Automatic Night Mode And Day Mode By OS Color Setting. As you can see, without any page refresh, my website automatically switches by my OS setting between Dark Mode And Light Mode. With a CSS Media query...

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published