The 30 CSS Selectors You Must Memorize

I don’t do this often, but for all the help Tuts+ gave me as I worked to expand the functionality of this design over the past few weeks, I can’t let it slip by without note. When I build a site, I prefer to do everything humanely possible with CSS rather than outsourcing it to JavaScript. Due to this perhaps irrational desire, everything — including device detection — but the ability to enter dark mode and save that preference across multiple sessions is managed strictly using CSS. As I’m sure you web developers out there can understand, this led to some sticky situations in which I almost resorted to a quick and dirty script. Thanks to resources like this one though, I managed to keep my use of JavaScript down to a minimum, and continue to ship a speedy site for you all to read. Next time you import jQuery out of habit, think back to this and ask yourself, “Can I do this with CSS?" Because after seeing tutorials like this, I bet you can.