::-webkit-search-cancel-button

Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.

The ::-webkit-search-cancel-button CSS pseudo-element represents a button (the "cancel button") at the edge of an of type="search" which clears away the current value of the element. This button and pseudo-element are non-standard, supported only in WebKit and Blink, hence the vendor prefix. The clear button is only shown on non-empty search elements.

Syntax

css
selector::-webkit-search-cancel-button {
  /* ... */
}

Specifications

Not part of any standard.

Browser compatibility

See also