Pseudo-element selectors change the appearance of an element fragment: the first line of a paragraph, a highlighted section of text, or the backdrop of a page in fullscreen or dialog or display mode.
This reading list is not yet exhaustive: pseudo-element selectors like ::before
and ::after
are used extensively in articles here, but do not yet have their own individual entries. That will change in very short order.
Many of these pseudo-selectors have specialized uses: ::first-letter
and ::first-line
are strongly associated with typography, for example, so you’ll tend to find discussion of those selectors in their respective contexts.
Image from Meyer-Optik Goerlitz's recent campaign to bring back the excellent Trioplan 100mm F/2.0 lens
Enjoy this piece? I invite you to follow me at twitter.com/dudleystorey to learn more.