coderef

@starting-styleBaseline · Newly available

The @starting-style CSS at-rule sets the starting values for properties that are transitioning when the target element's style is first updated.

Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Aug 6, 2024.

Browser support

DesktopChrome
1–116Not supported
117+Supportedsince Sep 12, 2023
Current: 155
Edge
12–116Not supported
117+Supportedsince Sep 15, 2023
Current: 154
Firefox
1–128Not supported
129+Supportedsince Aug 6, 2024
Current: 157
Safari
1–17.4Not supported
17.5+Supportedsince May 13, 2024
Current: 27
MobileChrome Android
18–116Not supported
117+Supportedsince Sep 12, 2023
Current: 155
Firefox Android
4–128Not supported
129+Supportedsince Aug 6, 2024
Current: 157
Safari iOS
1–17.4Not supported
17.5+Supportedsince May 13, 2024
Current: 27

How to use

Every current browser supports this, but it only became Baseline on Aug 6, 2024. Use it as a progressive enhancement, or keep a fallback if you support older devices.

Example

Full syntax and examples are on MDN: CSSStartingStyleRule.

Feature detection

JS · check before using
if ("CSSStartingStyleRule" in globalThis) {
  // CSSStartingStyleRule is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (2). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
CSSStartingStyleRule11711712917.511712917.5
@starting-style11711712917.511712917.5