Today I learned

CSS Selectors Visual Guide

Edit this Post Opens in new tab

CSS has become way more powerful over the last few years. A lot of significant improvements were added to the language, and I like the way where it is going.

Recently, I stumbled over this CSS Selectors Visual Guide by Sébastien Noël Opens in new tab, and I love it. I would have loved this when I started learning and working with CSS!

As the name suggests, it is a visual guide to all the CSS selectors. You get an example of the selector on the left and an image of the selected element on the right. I'm surprised no one else has done this before.

This is a definite bookmark for me. Although I've been working with CSS for years, I even learned something new. I learned about the lobotomized owl selector Opens in new tab, which selects all elements with a preceding sibling.

* + * {
  margin-top: 1.5em;
}

It's a great way to select all elements, but not the first one in a container. I can imagine that I will visit this guide a lot in the future because of the great overview it provides. If you forgot about the exact selector for valid inputs or attribute selectors just head over there.


I hope you enjoyed this post and learned something new. If you have any questions, feel free to reach out to me via Email Opens in new tab.

If you want to support me, you can buy me a coffee. I would be very happy about it!

☕️ Buy me a coffee ☕️

I wish you a wonderful day! Marco