Home CSS Pseudo Classes
Post
Cancel

CSS Pseudo Classes

:is()

Before

1
2
3
4
5
.example h3,
.example h4,
.example a {
  color: red;
  }

Now

1
2
3
.example :is(h3, h4, a) {
  color: red;
  }

:has()

Before

1
2
3
.example img {
  color: red;
  }

Now

1
2
3
.example :has(img) {
  color: red;
  }
This post is licensed under CC BY 4.0 by the author.