Re: [css3-transitions] transitioning to/from auto value

On Tue, Apr 27, 2010 at 1:36 PM, Simon Fraser <smfr@me.com> wrote:
> I'm very reluctant to put something in a specification for which a correct implementation would be extremely difficult, and for which a "reasonable" implementation would show glitches in many common situations. I know that if we ended up implementing your suggestion in WebKit, it would not be long before we get a bug about transitioning to an 'auto' value using the wrong target size.

While I understand your reluctance, the lack of such a facility means
that it's impossible to transition the height of a <details> element
when you open/close it, frex.  I know that we authors will *strongly*
want to do so.

Actually, we'll probably be transitioning a wrapper for the contents
of the <details> instead - that is, we'll be doing this:

<details>
  <summary>foo</summary>
  <div>bar</div>
</details>
<style>
details > div {
  height: 0;
  overflow: hidden;
  box-sizing: border-box;
  transition: height .5s;
}
details[open] > div {
  height: auto;
}
</style>

It would be both strange and annoying if we could transition
everything else in CSS, but doing this simple native HTML widget
required either UA magic or javascript.

~TJ

Received on Tuesday, 27 April 2010 22:36:47 UTC