Skip to content

CSS interpolate-size property and calc-size() function #348

Closed

Description

@dbaron

WebKittens

No response

Title of the spec

CSS calc-size() function

URL to the spec

https://drafts.csswg.org/css-values-5/#calc-size

URL to the spec's repository

https://github.com/w3c/csswg-drafts/issues

Issue Tracker URL

No response

Explainer URL

https://github.com/w3c/csswg-drafts/blob/main/css-values-5/calc-size-explainer.md

TAG Design Review URL

w3ctag/design-reviews#955

Mozilla standards-positions issue URL

mozilla/standards-positions#1022

WebKit Bugzilla URL

https://bugs.webkit.org/show_bug.cgi?id=274177

Radar URL

No response

Description

Animation to or from auto heights is commonly requested by web developers. It is important for animation of elements (such as the contents of disclosure widgets) opening/closing between a content-based height (or width) and a small (often zero) height (or width). This calc-size() proposal fits the desire to do such animations into the way that CSS transitions and animations work. More generally, this allows animating between a fixed length and almost any type of height (or width, or min/max-height/width) that can currently be specified in CSS.

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., in the cases where we can animate those keywords.

The CSS calc-size() function is a CSS function similar to calc(), but that also supports operations on exactly one of the values auto, min-content, max-content, fit-content, stretch, or contain, which are the intrinsic sizing keywords. This function is used to represent the values in the middle of the animations allowed by the interpolate-size property.

Activity

  1. added
    topic: css
    from: Google
    on May 22, 2024
  2. added
    topic: animation
    on May 22, 2024
  3. changed the title [-]CSS calc-size() function[/-] [+]CSS interpolate-size property and calc-size() function[/+] on Jul 10, 2024
  4. dbaron commented on Jul 10, 2024

    @dbaron
    Author

    I've updated the title and description to also cover the interpolate-size property, particularly given the rationale described in w3c/csswg-drafts#10294 (comment) .

  5. tats-u commented on Jan 29, 2025

    @tats-u

    @fantasai What are you concerned about? This is submitted by Google, but there should not be any privacy infringement factor.

  6. waterplea commented on Sep 17, 2026

    @waterplea

    Any estimate on this thing? It's a very helpful feature that's been available on chromium for years by now, but we cannot use it if other major browsers ignore it.

  7. bramus commented on Sep 17, 2026

    @bramus

    I read in https://bugs.webkit.org/show_bug.cgi?id=274177#c5 that this is currently being implemented. So that means the position:support can be added here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

from: Googleposition: supporttopic: animationtopic: cssvenue: W3C CSS WG

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions