W3C home > Mailing lists > Public > www-style@w3.org > April 2010

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 27 Apr 2010 15:35:49 -0700
Message-ID: <q2ndd0fbad1004271535hb1e8b53axce2a807809dced85@mail.gmail.com>
To: Simon Fraser <smfr@me.com>
Cc: Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:26 GMT