Native CSS intrinsic size animations: The end of JavaScript height hacks

Monday 16 November 2026, 11:04 AM

Native CSS intrinsic size animations: The end of JavaScript height hacks

Discover how the late-2026 rollout of CSS interpolate-size and calc-size() natively solves the decades-old challenge of animating to height: auto without JS.


For over two decades, animating an element to an unknown intrinsic dimension like height: auto has been one of the most frustrating bottlenecks I have encountered in web development. In my experience building interfaces, we have all fought this battle. I want a simple accordion or dropdown to open smoothly, but the browser refuses because it cannot interpolate between a fixed pixel value and a keyword like auto.

To get around this, I traditionally had to throw JavaScript at the problem. We wired up fragile ResizeObserver routines or relied on sluggish max-height CSS hacks. It works, but it bloats our bundles and hurts performance. Now, in late 2026, the CSS Values and Units Module Level 5 is rolling out a native fix. It offers a much cleaner way to handle front-end architecture without the usual workarounds.

The quiet unbundling of component libraries

While solo developers will appreciate the cleaner syntax, the structural advantage goes to component libraries and design systems. Think about the maintainers of large UI ecosystems. Until now, they had to ship heavy JavaScript measuring routines just to animate a modal or a collapsible menu.

By shifting this workload entirely to the optimized rendering engine of the browser, these libraries can deprecate those JS dependencies. This means reduced bundle sizes and a better Time to Interactive (TTI). On the flip side, the standalone third-party animation packages that built their entire product around solving this one layout quirk are suddenly obsolete. Native CSS is eating their lunch, and our users get a faster experience by default.

Implementing the new CSS properties

The solution comes down to two new features. First is the interpolate-size property. The CSS Working Group intentionally designed this as a mandatory opt-in feature. In my own projects, I apply a global :root { interpolate-size: allow-keywords; } rule. This is a smart safety mechanism. It prevents backwards-compatibility issues and stops legacy stylesheets from suddenly animating things they shouldn't.

Second is the calc-size() function. The syntax evolved from its early experimental phase and now strictly enforces a two-argument form. I have to provide a basis and a calculation, such as calc-size(auto, size). Legacy single-argument implementations are dead in modern browser engines.

When I combine these with the new @starting-style at-rule and transition-behavior: allow-discrete, the results are highly effective. We can finally animate elements smoothly from display: none and height: 0 directly to display: block and height: auto without writing a single line of JavaScript.

Safari adoption and the path to stability

Google drove this initiative through Chromium, and in my experience, features like this often languish in Chrome-only territory for years. But on October 8, 2026, Apple released Safari Technology Preview 254, officially adding support for both interpolate-size and calc-size().

This WebKit implementation is the milestone we needed. It signals that intrinsic size animations are exiting Chromium exclusivity and heading to stable iOS and macOS releases. As of November 2026, global user support sits at around 73.9 percent according to CanIUse. The feature is fully mature across Chrome 129+, Edge 129+, and Samsung Internet 28+.

Progressive enhancement and edge cases

Even with native support, I have learned to be careful with the execution. The opt-in requirement is there for a reason, but developers also need to rethink how they handle overflow. If I am building a collapsible component, I need to use overflow: clip rather than overflow: hidden. Relying on hidden can cause layout stuttering during the animation.

This API is a perfect candidate for progressive enhancement. Browsers that do not support it will simply snap the element open. That is a perfectly acceptable fallback while we wait for the global support numbers to climb into the high nineties. I am already looking through my older codebases to see which JavaScript resize routines I can finally delete. It is rare that we get to remove code while improving the user experience, but this update delivers exactly that.


References

Subscribe to our mailing list

We'll send you an email whenever there's a new post

Copyright © 2026 Tech Vogue