v156 · @property
Descriptor lab
Build an @property registration by choosing which descriptors to include, then register it for real. The verdict below is what this browser did with it — accepted, or thrown out for being incomplete.
Compose a registration
The rule you built
- Registration
- not attempted
- Computed value
- —
- With no author value
- —
- var() fallback used?
- —
Applied to a real element
code path
// An incomplete registration fails in two different ways before
// Chrome 156, and it is worth knowing which is which:
//
// omitted `inherits` -> TypeError, from WebIDL: it was a
// REQUIRED dictionary member
// omitted `initial-value` -> SyntaxError, from the API: a typed
// syntax had to have one
//
// Chrome 156 accepts both.
try {
CSS.registerProperty({ name, syntax: "<length>" });
console.log("[@property] accepted with syntax only");
} catch (error) {
console.warn("[@property] rejected:", error.name, error.message);
}