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

Hi, what I'm about to mention isn't exactly a `height: auto` solution but it doesn't rely on `max-height` being set to a exceptionally high value which will allow an element to expand to any size, instead it relies on max-height: 100% through a flex element.
 
While I was working on a component library we had the need for an "Expander" component and I managed to build something that expands to "100% height" of the element but with `max-height: 100%;`.

**I'm wondering is this a bug that may be "fixed" in browsers in the future, or is it somewhat safe to assume that since this is working due to the `flex` specifications it's safe to use?**

I believe it works by the fact that `display: flex;` elements are aware of their own size and as such can adjust to their "max height". Somehow it only works if it's not a direct element child of the flex container though.

https://codepen.io/jchiem/pen/vYGXxbq


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


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

Received on Wednesday, 19 August 2020 12:00:17 UTC