const min = new CSSMathMin(CSS.px(10), CSS.em(5), CSS.percent(50));
console.log(min.values);
// CSSNumericArray {0: CSSUnitValue, 1: CSSUnitValue, 2: CSSUnitValue, length: 3}
console.log(min.values.length); // 3CSSMathMin: values property / notebook
CSSMathMin: values property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
for (const value of min.values) {
console.log(
`${value.constructor.name}: ${value.value} ${value.unit} (${value})`,
);
}
// CSSUnitValue: 10 px (10px)
// CSSUnitValue: 5 em (5em)
// CSSUnitValue: 50 percent (50%)