← Back to release summary

Optional descriptors for registered custom properties

Category
CSS
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

WPT details: https://wpt.fyi/results/css/css-properties-values-api/at-property.html https://wpt.fyi/results/css/css-properties-values-api/at-property-cssom.html https://wpt.fyi/results/css/css-properties-values-api/determine-registration.html https://wpt.fyi/results/css/css-properties-values-api/register-property.html

Summary

Allows authors to omit any descriptor in an @property rule and the corresponding optional members of CSS.registerProperty(). Omitted values default to universal syntax, inheritance, and the guaranteed-invalid initial value; invalid descriptors use normal CSS fallback behavior.

Motivation

Registered custom properties currently require authors to repeat syntax and inherits descriptors, and typed registrations cannot omit initial-value. The CSSWG resolved that registrations should behave like unregistered custom properties except for the descriptors authors explicitly provide. This removes boilerplate and lets typed properties use per-use var() fallbacks by defaulting initial-value to the guaranteed-invalid value.

Standards & signals

Ecosystem

View on chromestatus.com