CSSMathClamp

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

The CSSMathClamp interface of the CSS Typed Object Model API represents the CSS clamp() function. It inherits properties and methods from its parent CSSNumericValue.

CSSStyleValue CSSNumericValue CSSMathValue CSSMathClamp

Constructor

CSSMathClamp()

Creates a new CSSMathClamp object.

Instance properties

CSSMathClamp.lower

Returns a CSSNumericValue object containing the minimum value.

CSSMathClamp.value

Returns a CSSNumericValue object containing the preferred value.

CSSMathClamp.upper

Returns a CSSNumericValue object containing the upper value.

Static methods

The interface also inherits methods from its parent interface, CSSMathValue.

Instance methods

The interface also inherits methods from its parent interface, CSSMathValue.

Examples

To do

Specifications

Specification
CSS Typed OM Level 1
# cssmathclamp

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
CSSMathClamp
Chrome – Full support
Chrome 100 (Release date: 2022-03-29)
footnote Full support
Edge – Full support
Edge 100 (Release date: 2022-04-01)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1278697
Opera – Full support
Opera 86 (Release date: 2022-04-20)
footnote Full support
Safari – Full support
Safari 16.4 (Release date: 2023-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 100 (Release date: 2022-03-29)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1278697
Opera Android – Full support
Opera Android 69 (Release date: 2022-05-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 16.4 (Release date: 2023-03-27)
footnote Full support
Samsung Internet – Full support
Samsung Internet 19 (Release date: 2022-11-01)
footnote Full support
WebView Android – Full support
WebView Android 100 (Release date: 2022-03-29)
footnote Full support
WebView on iOS – Full support
WebView on iOS 16.4 (Release date: 2023-03-27)
footnote Full support
CSSMathClamp() constructor
Chrome – Full support
Chrome 100 (Release date: 2022-03-29)
footnote Full support
Edge – Full support
Edge 100 (Release date: 2022-04-01)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1278697
Opera – Full support
Opera 86 (Release date: 2022-04-20)
footnote Full support
Safari – Full support
Safari 16.4 (Release date: 2023-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 100 (Release date: 2022-03-29)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1278697
Opera Android – Full support
Opera Android 69 (Release date: 2022-05-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 16.4 (Release date: 2023-03-27)
footnote Full support
Samsung Internet – Full support
Samsung Internet 19 (Release date: 2022-11-01)
footnote Full support
WebView Android – Full support
WebView Android 100 (Release date: 2022-03-29)
footnote Full support
WebView on iOS – Full support
WebView on iOS 16.4 (Release date: 2023-03-27)
footnote Full support
lower
Chrome – Full support
Chrome 100 (Release date: 2022-03-29)
footnote Full support
Edge – Full support
Edge 100 (Release date: 2022-04-01)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1278697
Opera – Full support
Opera 86 (Release date: 2022-04-20)
footnote Full support
Safari – Full support
Safari 16.4 (Release date: 2023-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 100 (Release date: 2022-03-29)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1278697
Opera Android – Full support
Opera Android 69 (Release date: 2022-05-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 16.4 (Release date: 2023-03-27)
footnote Full support
Samsung Internet – Full support
Samsung Internet 19 (Release date: 2022-11-01)
footnote Full support
WebView Android – Full support
WebView Android 100 (Release date: 2022-03-29)
footnote Full support
WebView on iOS – Full support
WebView on iOS 16.4 (Release date: 2023-03-27)
footnote Full support
upper
Chrome – Full support
Chrome 100 (Release date: 2022-03-29)
footnote Full support
Edge – Full support
Edge 100 (Release date: 2022-04-01)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1278697
Opera – Full support
Opera 86 (Release date: 2022-04-20)
footnote Full support
Safari – Full support
Safari 16.4 (Release date: 2023-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 100 (Release date: 2022-03-29)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1278697
Opera Android – Full support
Opera Android 69 (Release date: 2022-05-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 16.4 (Release date: 2023-03-27)
footnote Full support
Samsung Internet – Full support
Samsung Internet 19 (Release date: 2022-11-01)
footnote Full support
WebView Android – Full support
WebView Android 100 (Release date: 2022-03-29)
footnote Full support
WebView on iOS – Full support
WebView on iOS 16.4 (Release date: 2023-03-27)
footnote Full support
value
Chrome – Full support
Chrome 100 (Release date: 2022-03-29)
footnote Full support
Edge – Full support
Edge 100 (Release date: 2022-04-01)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1278697
Opera – Full support
Opera 86 (Release date: 2022-04-20)
footnote Full support
Safari – Full support
Safari 16.4 (Release date: 2023-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 100 (Release date: 2022-03-29)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1278697
Opera Android – Full support
Opera Android 69 (Release date: 2022-05-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 16.4 (Release date: 2023-03-27)
footnote Full support
Samsung Internet – Full support
Samsung Internet 19 (Release date: 2022-11-01)
footnote Full support
WebView Android – Full support
WebView Android 100 (Release date: 2022-03-29)
footnote Full support
WebView on iOS – Full support
WebView on iOS 16.4 (Release date: 2023-03-27)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

See also