Light & Dark mode WITHOUT CSS!
Автор: Kevin Powell
Загружено: 2022-04-21
Просмотров: 108705
The color-scheme property is a super useful property. It allows us to switch the UI elements, like form controls, scrollbars, and all that to light or dark modes, but it also has a meta tag that we can use as well, allowing us to create light and dark modes without even writing any CSS!
🔗 Links
✅ Polypane: https://a.paddle.com/v2/click/39438/1... (this is an affiliate link, so if you do purchase, it would also help support my channel)
✅ A really in-depth article that helped me put this video together: https://web.dev/color-scheme/
⌚ Timestamps
00:00 - Introduction
00:59 - The problem with the prefers-color-scheme media query
02:38 - Setting a default color-scheme
04:15 - light and dark modes with color-scheme
05:05 - Using color-scheme with prefers-color-scheme
06:22 - the color-scheme meta tag
07:33 - Setting color-scheme on individual elements
09:55 - differences between browsers
#css
--
Come hang out with other dev's in my Discord Community
💬 / discord
Keep up to date with everything I'm up to
✉ https://www.kevinpowell.co/newsletter
Come hang out with me live every Monday on Twitch!
📺 / kevinpowellcss
---
Help support my channel
👨🎓 Get a course: https://www.kevinpowell.co/courses
👕 Buy a shirt: https://teespring.com/stores/making-t...
💖 Support me on Patreon: / kevinpowell
---
My editor: VS Code - https://code.visualstudio.com/
---
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.
Twitter: / kevinjpowell
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: