@property

The @property rule is an alternative way to register a custom property without JavaScript.

Motivation

Waiting for a script to register a property may not be desirable in all cases. Depending on (async) circumstances, registering a property in JS can cause a full style recalculation of the document, depending on when it happens. With @property, the registration can be part of the CSS stylesheet, the same way, for example, @keyframes can.

Status in Chromium

Blink


Enabled by default (tracking bug) in:

  • Chrome for desktop release 85
  • Chrome for Android release 85
  • Android WebView release 85

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owner

Last updated on 2020-10-25