Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS calc-size() and interpolate-size (transition 0 to auto) #735

Open
jsnkuhn opened this issue Sep 19, 2024 · 0 comments
Open

CSS calc-size() and interpolate-size (transition 0 to auto) #735

jsnkuhn opened this issue Sep 19, 2024 · 0 comments
Labels
focus-area-proposal Focus Area Proposal

Comments

@jsnkuhn
Copy link

jsnkuhn commented Sep 19, 2024

Description

dbaron's description from - WebKit/standards-positions#348

"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."

Specification

https://www.w3.org/TR/css-values-5/#calc-size

Additional Signals

Just added to Chrome stable as of 129. Chrome blog post:
https://developer.chrome.com/docs/css-ui/animate-to-height-auto

Mozilla Standard Position:
mozilla/standards-positions#1022

Webkit Standard Position:
WebKit/standards-positions#348

Web Platform Test:
https://wpt.fyi/results/css/css-values/calc-size?label=master&label=experimental&aligned&q=calc-size

@jsnkuhn jsnkuhn added the focus-area-proposal Focus Area Proposal label Sep 19, 2024
@jsnkuhn jsnkuhn changed the title CSS calc-size() and interpolate-size CSS calc-size() and interpolate-size (transition 0 to auto) Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus-area-proposal Focus Area Proposal
Projects
Status: No status
Development

No branches or pull requests

1 participant