<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/added-to-my-css-reset-interpolate-size-the-quality-of-life-feature-we-all-wanted-at-some-point-joifk7pig" -->

---
title: Added to my CSS reset: interpolate-size, the...
description: A CSS technique for animating width and height to and from keyword values like auto, max-content, and min-content using the new interpolate-size property....
canonical: https://daily.dev/posts/added-to-my-css-reset-interpolate-size-the-quality-of-life-feature-we-all-wanted-at-some-point-joifk7pig
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Added to my CSS reset: interpolate-size, the quality-of-life feature we all wanted at some point | daily.dev
og:description: A CSS technique for animating width and height to and from keyword values like auto, max-content, and min-content using the new interpolate-size property....
og:url: https://daily.dev/posts/added-to-my-css-reset-interpolate-size-the-quality-of-life-feature-we-all-wanted-at-some-point-joifk7pig
og:image: https://api.daily.dev/og/posts/joiFk7pig.png
og:image:alt: Added to my CSS reset: interpolate-size, the quality-of-life feature we all wanted at some point
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Added to my CSS reset: interpolate-size, the quality-of-life feature we all wanted at some point

**[utilitybend](https://daily.dev/sources/utilitybend)** · 8 min read · 0 upvotes · 0 comments

## Summary

A CSS technique for animating width and height to and from keyword values like auto, max-content, and min-content using the new interpolate-size property. Setting interpolate-size: allow-keywords at the :root level (wrapped in an @supports query) enables auto-width transitions without JavaScript hacks or max-width workarounds. For per-element control instead of a global flag, calc-size() offers a case-by-case alternative. Practical demos cover animated buttons, expandable image cards, and collapsible navigation. A bonus section covers pairing this with Chrome 131's new ::details-content pseudo-element and transition-behavior: allow-discrete to animate native <details> accordions, noting that content-visibility must also be transitioned. Currently Chrome-only but designed as a progressive enhancement since unsupported browsers simply skip the animation.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://utilitybend.com/blog/added-to-my-css-reset-interpolate-size-the-quality-of-life-feature-we-all-wanted-at-some-point>

## Questions this post answers

### How do I animate a CSS width or height from a fixed value to auto without JavaScript?

Use the interpolate-size CSS property set to allow-keywords on the :root element, wrapped in an @supports (interpolate-size: allow-keywords) feature query. This lets transitions work between a length and a keyword value like auto, max-content, min-content, or stretch. It is available in Chrome, so unsupported browsers simply skip the animation as a progressive enhancement.

_Developers wiring up auto-width animations can track browser support shifts for CSS features like this on daily.dev._

### What is the difference between interpolate-size: allow-keywords and calc-size() in CSS?

Interpolate-size: allow-keywords is set globally on :root and changes default transition behavior for all keyword-to-length animations across a page, while calc-size() applies the same capability case by case on individual properties. Calc-size() is safer for legacy projects where changing global animation defaults risks breaking existing behavior or causing unwanted animations elsewhere.

_Teams choosing a CSS approach for legacy versus new projects can weigh trade-offs like this on daily.dev._

### How do I animate the content of a native HTML details element in Chrome 131?

Target the new ::details-content pseudo-element and transition its height and padding-block, but also transition the content-visibility property using transition-behavior: allow-keywords (with allow-discrete placed last in the transition shorthand), since content-visibility is a keyword property controlled by the user-agent stylesheet and animating height alone is not enough.

_Developers building accordion-style details elements can keep up with pseudo-element changes like this via daily.dev._

## Similar posts on daily.dev

- [The CSS ballot for Interop 2027](https://daily.dev/posts/the-css-ballot-for-interop-2027-7msncfmgl) · Bytes by ui.dev · 0 upvotes · 0 comments
- [Cross-Document View Transitions: Scaling Across Hundreds of Elements](https://daily.dev/posts/cross-document-view-transitions-scaling-across-hundreds-of-elements-8ebnbkdye) · CSS-Tricks · 7 upvotes · 0 comments
- [Transitioning Field Sizing Content With CSS · October 3, 2026](https://daily.dev/posts/transitioning-field-sizing-content-with-css-october-3-2026-gbbw5edae) · Adam Argyle · 3 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css), [#google-chrome](https://daily.dev/tags/google-chrome)

[View this post on daily.dev](https://daily.dev/posts/added-to-my-css-reset-interpolate-size-the-quality-of-life-feature-we-all-wanted-at-some-point-joifk7pig)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Added to my CSS reset: interpolate-size, the quality-of-life feature we all wanted at some point","url":"https://daily.dev/posts/added-to-my-css-reset-interpolate-size-the-quality-of-life-feature-we-all-wanted-at-some-point-joifk7pig","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/added-to-my-css-reset-interpolate-size-the-quality-of-life-feature-we-all-wanted-at-some-point-joifk7pig"},"datePublished":"2026-09-20T07:43:36.331Z","dateModified":"2026-09-20T07:47:32.126Z","description":"A CSS technique for animating width and height to and from keyword values like auto, max-content, and min-content using the new interpolate-size property....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/52509418d7db59ab61974ae3637d940b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/52509418d7db59ab61974ae3637d940b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"utilitybend","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"utilitybend","logo":"https://media.daily.dev/image/upload/s--hONVFSz4--/f_auto,q_auto/v1789890196/logos/utilitybend?_a=BAMAMicg0","url":"https://daily.dev/sources/utilitybend"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/added-to-my-css-reset-interpolate-size-the-quality-of-life-feature-we-all-wanted-at-some-point-joifk7pig","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"css,google-chrome","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"utilitybend","item":"https://daily.dev/sources/utilitybend"},{"@type":"ListItem","position":3,"name":"Added to my CSS reset: interpolate-size, the quality-of-life feature we all wanted at some point"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/added-to-my-css-reset-interpolate-size-the-quality-of-life-feature-we-all-wanted-at-some-point-joifk7pig#faq","mainEntity":[{"@type":"Question","name":"How do I animate a CSS width or height from a fixed value to auto without JavaScript?","acceptedAnswer":{"@type":"Answer","text":"Use the interpolate-size CSS property set to allow-keywords on the :root element, wrapped in an @supports (interpolate-size: allow-keywords) feature query. This lets transitions work between a length and a keyword value like auto, max-content, min-content, or stretch. It is available in Chrome, so unsupported browsers simply skip the animation as a progressive enhancement. Developers wiring up auto-width animations can track browser support shifts for CSS features like this on daily.dev."}},{"@type":"Question","name":"What is the difference between interpolate-size: allow-keywords and calc-size() in CSS?","acceptedAnswer":{"@type":"Answer","text":"Interpolate-size: allow-keywords is set globally on :root and changes default transition behavior for all keyword-to-length animations across a page, while calc-size() applies the same capability case by case on individual properties. Calc-size() is safer for legacy projects where changing global animation defaults risks breaking existing behavior or causing unwanted animations elsewhere. Teams choosing a CSS approach for legacy versus new projects can weigh trade-offs like this on daily.dev."}},{"@type":"Question","name":"How do I animate the content of a native HTML details element in Chrome 131?","acceptedAnswer":{"@type":"Answer","text":"Target the new ::details-content pseudo-element and transition its height and padding-block, but also transition the content-visibility property using transition-behavior: allow-keywords (with allow-discrete placed last in the transition shorthand), since content-visibility is a keyword property controlled by the user-agent stylesheet and animating height alone is not enough. Developers building accordion-style details elements can keep up with pseudo-element changes like this via daily.dev."}}]}
```

