Type Parameters

  • T

Hierarchy

  • CSSClasses

Properties

&:-moz-any(): T

Represents an element that is represented by the selector list passed as its argument. Standardized as :matches().

(Firefox 4)

&:-moz-any-link: T

Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links.

(Firefox 1)

&:-moz-broken: T

Non-standard. Matches elements representing broken images.

(Firefox 3)

MDN Reference

&:-moz-drag-over: T

Non-standard. Matches elements when a drag-over event applies to it.

(Firefox 1)

&:-moz-first-node: T

Non-standard. Represents an element that is the first child node of some other element.

(Firefox 1)

&:-moz-focusring: T

Non-standard. Matches an element that has focus and focus ring drawing is enabled in the browser.

(Firefox 4)

&:-moz-full-screen: T

Matches any element that has its fullscreen flag set. Standardized as :fullscreen.

(Firefox 9)

&:-moz-last-node: T

Non-standard. Represents an element that is the last child node of some other element.

(Firefox 1)

&:-moz-loading: T

Non-standard. Matches elements, such as images, that haven’t started loading yet.

(Firefox 3)

&:-moz-only-whitespace: T

The same as :empty, except that it additionally matches elements that only contain code points affected by whitespace processing. Standardized as :blank.

(Firefox 1)

MDN Reference

&:-moz-placeholder: T

Deprecated. Represents placeholder text in an input field. Use ::-moz-placeholder for Firefox 19+.

(Firefox 4)

&:-moz-submit-invalid: T

Non-standard. Represents any submit button when the contents of the associated form are not valid.

(Firefox 88)

MDN Reference

&:-moz-suppressed: T

Non-standard. Matches elements representing images that have been blocked from loading.

(Firefox 3)

&:-moz-ui-invalid: T

Non-standard. Represents any validated form element whose value isn't valid

(Firefox 4)

&:-moz-ui-valid: T

Non-standard. Represents any validated form element whose value is valid

(Firefox 4)

&:-moz-user-disabled: T

Non-standard. Matches elements representing images that have been disabled due to the user’s preferences.

(Firefox 3)

&:-moz-window-inactive: T

Non-standard. Matches elements in an inactive window.

(Firefox 4)

MDN Reference

&:-ms-fullscreen: T

Matches any element that has its fullscreen flag set.

(IE 11)

&:-ms-input-placeholder: T

Represents placeholder text in an input field. Note: for Edge use the pseudo-element ::-ms-input-placeholder. Standardized as ::placeholder.

(IE 10)

&:-ms-keyboard-active: T

Windows Store apps only. Applies one or more styles to an element when it has focus and the user presses the space bar.

(IE 10)

&:-ms-lang(): T

Represents an element that is in the language specified. Accepts a comma separated list of language tokens.

(Edge, IE 10)

&:-webkit-any(): T

Represents an element that is represented by the selector list passed as its argument. Standardized as :matches().

(Chrome, Safari 5)

&:-webkit-full-screen: T

Matches any element that has its fullscreen flag set. Standardized as :fullscreen.

(Chrome, Safari 6)

&:active: T

Applies while an element is being activated by the user. For example, between the times the user presses the mouse button and releases it.

MDN Reference

&:any-link: T

Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links.

(Edge 79, Firefox 50, Safari 9, Chrome 65, Opera 52)

MDN Reference

&:blank: T

⚠️ Property is experimental. Be cautious when using it.️

The :blank CSS pseudo-class selects empty user input elements (eg. <input> or <textarea>).

MDN Reference

&:checked: T

Radio and checkbox elements can be toggled by the user. Some menu items are 'checked' when the user selects them. When such elements are toggled 'on' the :checked pseudo-class applies.

MDN Reference

&:corner-present: T

Non-standard. Indicates whether or not a scrollbar corner is present.

(Chrome, Safari 5)

&:current: T

⚠️ Property is experimental. Be cautious when using it.️

The :current CSS pseudo-class selector is a time-dimensional pseudo-class that represents the element, or an ancestor of the element, that is currently being displayed

&:decrement: T

Non-standard. Applies to buttons and track pieces. Indicates whether or not the button or track piece will decrement the view’s position when used.

(Chrome, Safari 5)

&:default: T

Applies to the one or more UI elements that are the default among a set of similar elements. Typically applies to context menu items, buttons, and select lists/menus.

(Edge 79, Firefox 4, Safari 5, Chrome 10, Opera 10)

MDN Reference

&:defined: T

⚠️ Property is experimental. Be cautious when using it.️

The :defined CSS pseudo-class represents any element that has been defined. This includes any standard element built in to the browser, and custom elements that have been successfully defined (i.e. with the CustomElementRegistry.define() method).

(Edge 79, Firefox 63, Safari 10, Chrome 54, Opera 41)

MDN Reference

&:dir: T

The :dir() CSS pseudo-class matches elements based on the directionality of the text contained in them.

(Firefox 49)

MDN Reference

&:disabled: T

Represents user interface elements that are in a disabled state; such elements have a corresponding enabled state.

MDN Reference

&:double-button: T

Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed together at the same end of the scrollbar.

(Chrome, Safari 5)

&:empty: T

Represents an element that has no children at all.

MDN Reference

&:enabled: T

Represents user interface elements that are in an enabled state; such elements have a corresponding disabled state.

MDN Reference

&:end: T

Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed after the thumb.

(Chrome, Safari 5)

&:first: T

When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context.

(Edge 12, Safari 6, Chrome 18, IE 8, Opera 9.2)

MDN Reference

&:first-child: T

Same as :nth-child(1). Represents an element that is the first child of some other element.

MDN Reference

&:first-of-type: T

Same as :nth-of-type(1). Represents an element that is the first sibling of its type in the list of children of its parent element.

MDN Reference

&:focus: T

Applies while an element has the focus (accepts keyboard or mouse events, or other forms of input).

MDN Reference

&:focus-visible: T

The :focus-visible pseudo-class applies while an element matches the :focus pseudo-class and the UA determines via heuristics that the focus should be made evident on the element.

(Edge 86, Firefox 85, Safari 15.4, Chrome 86, Opera 72)

MDN Reference

&:focus-within: T

The :focus-within pseudo-class applies to any element for which the :focus pseudo class applies as well as to an element whose descendant in the flat tree (including non-element nodes, such as text nodes) matches the conditions for matching :focus.

(Edge 79, Firefox 52, Safari 10.1, Chrome 60, Opera 47)

MDN Reference

&:fullscreen: T

Matches any element that has its fullscreen flag set.

MDN Reference

&:future: T

Represents any element that is defined to occur entirely after a :current element.

(Safari 7)

MDN Reference

&:has: T

⚠️ Property is experimental. Be cautious when using it.️

:The :has() CSS pseudo-class represents an element if any of the selectors passed as parameters (relative to the :scope of the given element), match at least one element.

(Safari 15.4)

MDN Reference

&:horizontal: T

Non-standard. Applies to any scrollbar pieces that have a horizontal orientation.

(Chrome, Safari 5)

&:host: T

When evaluated in the context of a shadow tree, matches the shadow tree’s host element.

(Edge 79, Firefox 63, Safari 10, Chrome 54, Opera 41)

MDN Reference

&:host(): T

When evaluated in the context of a shadow tree, it matches the shadow tree’s host element if the host element, in its normal context, matches the selector argument.

(Chrome 35, Opera 22)

&:host-context(): T

Tests whether there is an ancestor, outside the shadow tree, which matches a particular selector.

(Chrome 35, Opera 22)

&:hover: T

Applies while the user designates an element with a pointing device, but does not necessarily activate it. For example, a visual user agent could apply this pseudo-class when the cursor (mouse pointer) hovers over a box generated by the element.

MDN Reference

&:in-range: T

Used in conjunction with the min and max attributes, whether on a range input, a number field, or any other types that accept those attributes.

(Edge 13, Firefox 29, Safari 5.1, Chrome 10, Opera 11)

MDN Reference

&:increment: T

Non-standard. Applies to buttons and track pieces. Indicates whether or not the button or track piece will increment the view’s position when used.

(Chrome, Safari 5)

&:indeterminate: T

Applies to UI elements whose value is in an indeterminate state.

MDN Reference

&:invalid: T

An element is :valid or :invalid when it is, respectively, valid or invalid with respect to data validity semantics defined by a different specification.

MDN Reference

&:is: T

⚠️ Property is experimental. Be cautious when using it.️

The :is() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list. This is useful for writing large selectors in a more compact form.

(Edge 88, Firefox 78, Safari 14, Chrome 88, Opera 74)

MDN Reference

&:lang(): T

Represents an element that is in language specified.

(Edge, Chrome, Firefox 1, IE 8, Opera 8, Safari 3)

&:last-child: T

Same as :nth-last-child(1). Represents an element that is the last child of some other element.

MDN Reference

&:last-of-type: T

Same as :nth-last-of-type(1). Represents an element that is the last sibling of its type in the list of children of its parent element.

MDN Reference

&:left: T

When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context.

(Edge 12, Safari 5.1, Chrome 6, IE 8, Opera 9.2)

MDN Reference

&:link: T

Applies to links that have not yet been visited.

MDN Reference

&:local-link: T

⚠️ Property is experimental. Be cautious when using it.️

The :local-link CSS pseudo-class represents an link to the same document

&:matches(): T

Takes a selector list as its argument. It represents an element that is represented by its argument.

(Safari 9)

&:no-button: T

Non-standard. Applies to track pieces. Applies when there is no button at that end of the track.

(Chrome, Safari 5)

&:not(): T

The negation pseudo-class, :not(X), is a functional notation taking a simple selector (excluding the negation pseudo-class itself) as an argument. It represents an element that is not represented by its argument.

(Edge, Chrome, Firefox 1, IE 9, Opera 9.5, Safari 2)

&:nth-child(): T

Represents an element that has an+b-1 siblings before it in the document tree, for any positive integer or zero value of n, and has a parent element.

(Edge, Chrome, Firefox 3.5, IE 9, Opera 9.5, Safari 3.1)

&:nth-col: T

⚠️ Property is experimental. Be cautious when using it.️

The :nth-col() CSS pseudo-class is designed for tables and grids. It accepts the An+B notation such as used with the :nth-child selector, using this to target every nth column.

&:nth-last-child(): T

Represents an element that has an+b-1 siblings after it in the document tree, for any positive integer or zero value of n, and has a parent element.

(Edge, Chrome, Firefox 3.5, IE 9, Opera 9.5, Safari 3.1)

&:nth-last-col: T

⚠️ Property is experimental. Be cautious when using it.️

The :nth-last-col() CSS pseudo-class is designed for tables and grids. It accepts the An+B notation such as used with the :nth-child selector, using this to target every nth column before it, therefore counting back from the end of the set of columns.

&:nth-last-of-type(): T

Represents an element that has an+b-1 siblings with the same expanded element name after it in the document tree, for any zero or positive integer value of n, and has a parent element.

(Edge, Chrome, Firefox 3.5, IE 9, Opera 9.5, Safari 3.1)

&:nth-of-type(): T

Represents an element that has an+b-1 siblings with the same expanded element name before it in the document tree, for any zero or positive integer value of n, and has a parent element.

(Edge, Chrome, Firefox 3.5, IE 9, Opera 9.5, Safari 3.1)

&:only-child: T

Represents an element that has a parent element and whose parent element has no other element children. Same as :first-child:last-child or :nth-child(1):nth-last-child(1), but with a lower specificity.

MDN Reference

&:only-of-type: T

Matches every element that is the only child of its type, of its parent. Same as :first-of-type:last-of-type or :nth-of-type(1):nth-last-of-type(1), but with a lower specificity.

MDN Reference

&:optional: T

A form element is :required or :optional if a value for it is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional.

MDN Reference

&:out-of-range: T

Used in conjunction with the min and max attributes, whether on a range input, a number field, or any other types that accept those attributes.

(Edge 13, Firefox 29, Safari 5.1, Chrome 10, Opera 11)

MDN Reference

&:past: T

Represents any element that is defined to occur entirely prior to a :current element.

(Safari 7)

MDN Reference

&:paused: T

⚠️ Property is experimental. Be cautious when using it.️

The :paused CSS pseudo-class selector is a resource state pseudo-class that will match an audio, video, or similar resource that is capable of being “played” or “paused”, when that element is “paused”.

&:picture-in-picture: T

⚠️ Property is experimental. Be cautious when using it.️

The :picture-in-picture CSS pseudo-class matches the element which is currently in picture-in-picture mode.

&:placeholder-shown: T

⚠️ Property is experimental. Be cautious when using it.️

The :placeholder-shown CSS pseudo-class represents any <input> or <textarea> element that is currently displaying placeholder text.

MDN Reference

&:playing: T

⚠️ Property is experimental. Be cautious when using it.️

The :playing CSS pseudo-class selector is a resource state pseudo-class that will match an audio, video, or similar resource that is capable of being “played” or “paused”, when that element is “playing”.

&:read-only: T

An element whose contents are not user-alterable is :read-only. However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents, most elements are :read-only.

(Edge 13, Firefox 78, Safari 4, Chrome 1, Opera 9)

MDN Reference

&:read-write: T

An element whose contents are not user-alterable is :read-only. However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents, most elements are :read-only.

(Edge 13, Firefox 78, Safari 4, Chrome 1, Opera 9)

MDN Reference

&:required: T

A form element is :required or :optional if a value for it is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional.

MDN Reference

&:right: T

When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context.

(Edge 12, Safari 5.1, Chrome 6, IE 8, Opera 9.2)

MDN Reference

&:root: T

Represents an element that is the root of the document. In HTML 4, this is always the HTML element.

MDN Reference

&:scope: T

Represents any element that is in the contextual reference element set.

(Edge 79, Firefox 32, Safari 7, Chrome 27, Opera 15)

MDN Reference

&:single-button: T

Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed separately at either end of the scrollbar.

(Chrome, Safari 5)

&:start: T

Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed before the thumb.

(Chrome, Safari 5)

&:target: T

Some URIs refer to a location within a resource. This kind of URI ends with a 'number sign' (#) followed by an anchor identifier (called the fragment identifier).

MDN Reference

&:target-within: T

⚠️ Property is experimental. Be cautious when using it.️

The :target-within CSS pseudo-class represents an element that is a target element or contains an element that is a target. A target element is a unique element with an id matching the URL's fragment.

MDN Reference

&:user-invalid: T

⚠️ Property is experimental. Be cautious when using it.️

The :user-invalid CSS pseudo-class represents any validated form element whose value isn't valid based on their validation constraints, after the user has interacted with it.

(Firefox 88)

MDN Reference

&:user-valid: T

⚠️ Property is experimental. Be cautious when using it.️

The :user-valid CSS pseudo-class represents any validated form element whose value validates correctly based on its validation constraints. However, unlike :valid it only matches once the user has interacted with it.

(Firefox 88)

MDN Reference

&:valid: T

An element is :valid or :invalid when it is, respectively, valid or invalid with respect to data validity semantics defined by a different specification.

MDN Reference

&:vertical: T

Non-standard. Applies to any scrollbar pieces that have a vertical orientation.

(Chrome, Safari 5)

&:visited: T

Applies once the link has been visited by the user.

MDN Reference

&:where: T

⚠️ Property is experimental. Be cautious when using it.️

The :where() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list.

(Edge 88, Firefox 78, Safari 14, Chrome 88, Opera 74)

MDN Reference

&:window-inactive: T

Non-standard. Applies to all scrollbar pieces. Indicates whether or not the window containing the scrollbar is currently active.

(Chrome, Safari 3)