transform-boxBaseline · Newly available
The transform-box CSS property sets the position and dimensions of the reference box relative to which an element's transformations are calculated.
Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Apr 16, 2024.
Browser support
DesktopChrome
1–117Not supported
118+Supportedsince Oct 10, 2023
Current: 155Edge
12–117Not supported
118+Supportedsince Oct 13, 2023
Current: 154Firefox
1–124Not supported
125+Supportedsince Apr 16, 2024
Current: 157Safari
1–13Not supported
13.1+Supportedsince Mar 24, 2020
Current: 27MobileChrome Android
18–117Not supported
118+Supportedsince Oct 10, 2023
Current: 155Firefox Android
4–124Not supported
125+Supportedsince Apr 16, 2024
Current: 157Safari iOS
1–13Not supported
13.4+Supportedsince Mar 24, 2020
Current: 27How to use
Every current browser supports this, but it only became Baseline on Apr 16, 2024. Use it as a progressive enhancement, or keep a fallback if you support older devices.
Example
Full syntax and examples are on MDN: transform-box.
Feature detection
CSS · check before using
@supports (transform-box: initial) {
/* styles that rely on transform-box */
}
/* or in JavaScript */
if (CSS.supports("transform-box", "initial")) {
// use it
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (6). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| transform-box | 64 | 79 | 55 | 11 | 64 | 55 | 11 |
| transform-box.border-box | 118 | 118 | 55 | 11 | 118 | 55 | 11 |
| transform-box.content-box | 118 | 118 | 125 | 13.1 | 118 | 125 | 13.4 |
| transform-box.fill-box | 64 | 79 | 55 | 11 | 64 | 55 | 11 |
| transform-box.stroke-box | 118 | 118 | 125 | 13.1 | 118 | 125 | 13.4 |
| transform-box.view-box | 64 | 79 | 55 | 11 | 64 | 55 | 11 |