CSS typed object modelLimited availability
The CSSStyleValue and its subclasses represent CSS values as distinct types instead of only strings. Also known as typed OM.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–65Not supported
66+Supportedsince Apr 17, 2018
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27MobileChrome Android
18–65Not supported
66+Supportedsince Apr 17, 2018
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27How to use
Not supported in Firefox, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: CSSImageValue.
Feature detection
JS · check before using
if ("CSSImageValue" in globalThis) {
// CSSImageValue is available
} else {
// load a polyfill or use a fallback
}Sub-features
Support for each part of the feature (132). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| CSSImageValue | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |
| CSSKeywordValue | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |
| CSSKeywordValue.CSSKeywordValue | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |
| CSSKeywordValue.value | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |
| CSSMathClamp | 100 | 100 | ✕ | 16.4 | 100 | ✕ | 16.4 |
| CSSMathClamp.CSSMathClamp | 100 | 100 | ✕ | 16.4 | 100 | ✕ | 16.4 |
| CSSMathClamp.lower | 100 | 100 | ✕ | 16.4 | 100 | ✕ | 16.4 |
| CSSMathClamp.upper | 100 | 100 | ✕ | 16.4 | 100 | ✕ | 16.4 |
| CSSMathClamp.value | 100 | 100 | ✕ | 16.4 | 100 | ✕ | 16.4 |
| CSSMathInvert | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |
| CSSMathInvert.CSSMathInvert | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |
| CSSMathInvert.value | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |
| CSSMathMax | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |
| CSSMathMax.CSSMathMax | 66 | 79 | ✕ | ✕ | 66 | ✕ | ✕ |
| CSSMathMax.values | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |
| CSSMathMin | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |
| CSSMathMin.CSSMathMin | 66 | 79 | ✕ | ✕ | 66 | ✕ | ✕ |
| CSSMathMin.values | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |
| CSSMathNegate | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |
| CSSMathNegate.CSSMathNegate | 66 | 79 | ✕ | 16.4 | 66 | ✕ | 16.4 |