Archives de
Auteur : Stephan Celestin

CSS PSEUDO CLASSES: :has(), :is() and :where()

CSS PSEUDO CLASSES: :has(), :is() and :where()

What’s a pseudo-class? As a reminder, a CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s). What is :has() ? It is a part of CSS selector 4 called relational pseudo-class. It represents elements whose relative scope selector matches when evaluated absolute Matching <a> elements that directly contain an <img> The following selector matches only <a> elements that directly contain an <img> child: a:has(> img) Matching <h1> elements that are followed by…

Lire la suite Lire la suite