demo · v141

Custom Property Enumeration

The bug is fixed: getComputedStyle(el) now lists custom properties (--my-tokens) alongside standard ones, and .length counts them. Iterate the live CSSStyleDeclaration below and confirm.

Computed-style probe target. Inline custom properties: --brand-primary, --brand-accent, --grid-gutter, --display-font.
Click a button to read getComputedStyle on the box above.

the call

const cs = getComputedStyle(el);
// Before Chrome 141: cs.length missed custom properties.
// After:  cs includes --brand-primary, --grid-gutter, etc.
const custom = [...cs].filter(p => p.startsWith("--"));
custom.forEach(p => console.log(p, cs.getPropertyValue(p)));

see also