P2.8: CSS Variables & Themes
CSS Variables (Custom Properties) allow you to store values and reuse them throughout stylesheets, enabling easy dark/light mode toggling.
BCA Practical Coding System • Er. Manoj Kumar
Windows OS • Linux • MS Office • Networking • Git • Web Tech
Test your technical fundamentals with our standard 90-minute Computer-Based Assessment. Submitting your test will automatically certify and link your official score to this student profile!
Link your professional profiles for job recruiters and share verified coding milestones on WhatsApp.
CSS Variables (Custom Properties) allow you to store values and reuse them throughout stylesheets, enabling easy dark/light mode toggling.
Lesson: p2-8-variables-themes
CSS Variables (Custom Properties) allow you to store values and reuse them throughout stylesheets, enabling easy dark/light mode toggling.
Variables are declared inside the :root pseudo-class and accessed using var().
:root {
--primary-color: #39FF14;
--bg-color: #060c18;
}
body {
background-color: var(--bg-color);
color: var(--primary-color);
}
