A wooden box full of nuts

CSS level 4: matches selector

CSS3 was already something really cool. Now, in version 4, or better saying, in level 4, as it will be divided from now, CSS has much more features. One of them is the :matches selector.

Using it, we could substitute something like that:

For that:

In other words, we get every highlight class that are children of a div or footer.

We could even make the inverse way, as in the example below: we select all p elements that have the success class or that is first-child.

See all posts...