CSSMathClamp: lower property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Want more browser support for this feature? Tell us why.
Note: This feature is available in Web Workers.
The lower read-only property of the CSSMathClamp interface returns a CSSNumericValue object representing its minimum value.
Value
Examples
>Basic usage
The following code creates a CSSMathClamp object, then reads its lower value.
js
const clamp = new CSSMathClamp(CSS.px(10), CSS.percent(50), CSS.px(500));
console.log(clamp.lower); // CSSUnitValue {value: 10, unit: "px"}
console.log(clamp.lower.value); // 10
console.log(clamp.lower.unit); // "px"
lower simply returns whatever CSSNumericValue was passed into the constructor — here that's a CSSUnitValue, since CSS.px(10) is a CSSUnitValue.
Passing a more complex expression, such as CSS.px(10).add(CSS.em(2)) (a CSSMathSum), means lower would return that CSSMathSum instead.
Specifications
| Specification |
|---|
| CSS Typed OM Level 1> # dom-cssmathclamp-lower> |