Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialbaderbouta
7,804 PointsDoesnt ":root" kinda replaces some simple JS?
Isn't it possible to skip simple JS eventlistening programming to do simple stuff like this? I feel like a lot of CSS is replacing some JS that I've learned in the past on treehouse.
2 Answers
Steven Parker
231,248 PointsHi, I was alerted by your tag.
I can't see how a pseudo-class would replace an event listener, but you're right that you can do a lot of things in CSS today that a few years ago could only be done in JavaScript.
The examples that first come to mind are CSS transitions and animations.