-webkit-transition CSS media feature

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

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.

Note: All browsers support the transition property without vendor prefixes. Only WebKit (Safari), and not Chromium, based browsers support the -webkit-transition media feature. No browsers support transition without the prefix as a media query (though some browsers do support - -webkit-transform-3d). Use the @supports (transition) feature query instead.

The -webkit-transition Boolean non-standard CSS media feature is a WebKit extension whose value is true if the browsing context supports CSS transitions.

Apple has a description in Safari CSS Reference; this is now called transition there.

Note: You should not use this media feature; it was never specified, has never been widely implemented, and has been removed from most browsers. Use a @supports feature query instead.

Syntax

css
@media (-webkit-transition) {
  /* CSS to use if this media feature and prefixed transitions are supported */
}

Examples

Use @supports instead

Do not use the -webkit-transition media feature. Instead, test for transition support using the CSS @supports at-rule, like this:

css
@supports (transition: initial) {
  /* CSS to use if transitions are supported */
}

Obsolete example

Before this became obsolete, you could use -webkit-transition in your CSS like this:

css
@media (-webkit-transition) {
  /* CSS to use if transitions are supported */
}

Specifications

Not part of any standard.

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
-webkit-transition media feature
Deprecated Non-standard
Chrome – No support
Chrome 2 – 35 (Release date: 2009-05-21)
footnote Removed in 36 and later
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote No support
Opera – No support
Opera 15 – 22 (Release date: 2013-07-02)
footnote Removed in 23 and later
Safari – Full support
Safari 4 (Release date: 2009-06-08)
footnote Full support
Chrome Android – No support
Chrome Android 18 – 35 (Release date: 2012-06-27)
footnote Removed in 36 and later
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – No support
Opera Android 14 – 22 (Release date: 2013-05-21)
footnote Removed in 24 and later
Safari on iOS – Full support
Safari on iOS 3.2 (Release date: 2010-04-03)
footnote Full support
Samsung Internet – No support
Samsung Internet 1 – 2.1 (Release date: 2013-04-27)
footnote Removed in 3 and later
WebView Android – No support
WebView Android 2 – 4.4.3 (Release date: 2009-10-26)
footnote Removed in 37 and later
WebView on iOS – Full support
WebView on iOS 3.2 (Release date: 2010-04-03)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Non-standard. Check cross-browser support before using.
Deprecated. Not for use in new websites.

See also