Skip to content

CSS Selectors

Root

About

The :root pseudo-class matches the root element of a document, for HTML documents this is always the html element.

The selector is often used to define global CSS custom properties.

Root

The selector matches all div elements that are children of of the root element - which is any div element.