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() function #348

Open
dbaron opened this issue May 14, 2024 · 0 comments
Open

CSS calc-size() function #348

dbaron opened this issue May 14, 2024 · 0 comments
Assignees
Labels
from: Google Proposed, edited, or co-edited by Google. topic: animation Spec relates to animation (including transitions) topic: css Spec relates to CSS (Cascading Style Sheets) venue: W3C CSS WG

Comments

@dbaron
Copy link

dbaron commented May 14, 2024

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 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 allows transitions and animations to and from these values (or mathematical functions of these values), as long as the calc-size() function is used on at least one of the endpoints of the transition or animation to opt in.

@marcoscaceres marcoscaceres added topic: css Spec relates to CSS (Cascading Style Sheets) from: Google Proposed, edited, or co-edited by Google. venue: W3C CSS WG labels May 22, 2024
@hober hober added the topic: animation Spec relates to animation (including transitions) label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from: Google Proposed, edited, or co-edited by Google. topic: animation Spec relates to animation (including transitions) topic: css Spec relates to CSS (Cascading Style Sheets) venue: W3C CSS WG
Projects
None yet
Development

No branches or pull requests

4 participants