What exactly is :root selector in CSS?
A brief guide outlining how :root pseudo-class in CSS works, where it's often used and why, along with potential pitfalls.
A brief guide outlining how :root pseudo-class in CSS works, where it's often used and why, along with potential pitfalls.
Chapters
- 00:00 What is :root pseudo-class
- 01:06 How :root in SVG works
- 03:21 Tip: Don’t define all your variables on :root
- 04:23 Pitfalls with :root inheritance
- 05:09 Should you use :root in your CSS?



