Temani Afif recently did this exercise and I thought I’d build off of it. Some of these are useful. Many of them are not. There’s a bird at the end!
html
html { /* I mean, duh */ }
:root
:root { /* Sarsaparilla, anyone? */ }
:root is a CSS pseudo-class that matches the root element of the current (XML) document. If the current document is a HTML document, then it matches <html> . The XML documents that you’ll most likely encounter as a web developer (besides HTML) are:
SVG documents: :root matches <svg>
RSS documents: :root matches <rss>
Atom documents: :root matches <feed>
MathML documents: :root matches <math>
Other XML documents: :root matches the outermost element (e.g., <note> )
But what’s the practicality of :root ?…