Skip to content

Non-Applicable Pseudo Classes

Overview

These pseudo classes are recognized by the parser, and have been identified as not being applicable in a Beautiful Soup environment. While the pseudo-classes will parse correctly, they will not match anything. This is because they cannot be implemented outside a live, browser environment. If at any time these are dropped from the CSS spec, they will simply be removed.

:active

Selects active elements.

:active

:current

:current selects the element, or an ancestor of the element, that is currently being displayed. The functional form of :current() takes a compound selector list.

:current
:current(selector1, selector2)

:focus

Represents an an element that has received focus.

:focus

:focus-visible

Selects an element that matches :focus and the user agent determines that the focus should be made evident on the element.

:focus-visible

:focus-within

Selects an element that has received focus or contains an element that has received focus.

:focus-within

:future

Selects an element that is defined to occur entirely after a :current element.

:future

:host

:host selects the element hosting a shadow tree. While the function form of :host() takes a complex selector list and matches the shadow host only if it matches one of the selectors in the list.

:host
:host(selector1, selector2)

:host-context()

Selects the element hosting shadow tree, but only if one of the element's ancestors match a selector in the selector list.

:host-context(parent descendant)

:hover

Selects an element when the user interacts with it by hovering over it with a pointing device.

:hover

Selects link (every <a>, <link>, and <area> element with an href attribute) elements whose absolute URL matches the element’s own document URL.

:local-link

:past

Selects an element that is defined to occur entirely prior to a :current element.

:past

:paused

Selects an element that is capable of being played or paused (such as an audio, video, or similar resource) and is currently "paused".

:paused

:playing

Selects an element that is capable of being played or paused (such as an audio, video, or similar resource) and is currently "playing".

:playing

:target

Selects a unique element (the target element) with an id matching the URL's fragment.

:target

:target-within

Selects a unique element with an id matching the URL's fragment or an element which contains the element.

:target-within

:user-invalid

Selects an element with incorrect input, but only after the user has significantly interacted with it.

:user-invalid

:visited

Selects links that have already been visited.

:visited