AI, Data Science & Cloud Certificates from Google, IBM & Meta
Finance Certifications Goldman Sachs and Amazon Teams Trust
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This beginner tutorial explains CSS custom variables and uses them to refactor page styles and create a custom dark mode with prefers-color-scheme.
Syllabus
Intro
Welcome
Why use CSS variables?
Starter Code
:root pseudo-class
Apply colors with CSS variables
Apply font styles with CSS variables
Nesting CSS variables
Adding more HTML content
Styling the main element
Order of operations
Styling the content with CSS variables
Redefining CSS variables
Create and apply a Dark Mode
Taught by
Dave Gray