Re: [csswg-drafts] [css-transitions] Transition to height (or width) "auto" (#626)

> Now we can animate CSS Grid too

Off-topic, but it's not the 1st time that I have seen this approach with `0fr` and `1fr`, but `minmax(0, 0fr)` and `minmax(0, 1fr)` with `overflow: hidden` on the grid container are probably a better choice to ensure that the element collapses to zero.

>  If it's set to 1fr and the inner content changes height, the transition doesn't happen

That would require some new kind of transitions that work on used values. Right now they are based on computed values. It's the same as with `height: 100%` and the containing block changes from 100px to 200px. Even if the percentage will resolve to a different value, the computed value keeps being `100%`, so the change will happen suddenly.

> Another benefit of `auto` being a computed value would be the ability to clamp it.

`height: auto` already computes to `auto`. What you want is being able to use it in math functions.

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/626#issuecomment-1518830224 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 22 April 2023 21:39:43 UTC