Description
The CSS interpolate-size property allows a page to opt in to animations and transitions of CSS intrinsic sizing keywords such as auto, min-content, fit-content, etc. A common use case is to transition between height: 0 and height: auto, for example in accordion components.
:root {
interpolate-size: allow-keywords;
}
Closely related is the new calc-size() function, which allows you to perform calculations on intrinsic size values (not supported by the regular calc() function).
.foo {
width: calc-size(min-content, size + 100px);
}
These features are supported in Chrome v129.
References:
Specification
web-feature
Test Links
https://wpt.fyi/results/?label=master&aligned&q=feature%3Acalc-size%20or%20feature%3Ainterpolate-size
Additional Signals
Description
The CSS
interpolate-sizeproperty allows a page to opt in to animations and transitions of CSS intrinsic sizing keywords such asauto,min-content,fit-content, etc. A common use case is to transition betweenheight: 0andheight: auto, for example in accordion components.Closely related is the new
calc-size()function, which allows you to perform calculations on intrinsic size values (not supported by the regularcalc()function).These features are supported in Chrome v129.
References:
Specification
web-feature
Test Links
https://wpt.fyi/results/?label=master&aligned&q=feature%3Acalc-size%20or%20feature%3Ainterpolate-size
Additional Signals
calc-size()andinterpolate-size#1008