- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Tue, 24 Nov 2009 18:55:07 -0800
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
On Nov 24, 2009, at 6:12 PM, "Tab Atkins Jr." <jackalmage@gmail.com>
wrote:
> On Tue, Nov 24, 2009 at 6:47 PM, Brad Kemper <brad.kemper@gmail.com>
> wrote:
>> On Nov 24, 2009, at 2:28 PM, "Tab Atkins Jr."
>> <jackalmage@gmail.com> wrote:
>>
>>> If I'm going to be using an asymmetric timing
>>> function for state transitions, though, as an author I'm going to
>>> expect that they *always* run in reverse when the state transitions
>>> back to 'normal'. This includes transition-delays. I'm not
>>> thinking
>>> of the transition from :link to :hover to :link as two independent
>>> changes, I think of them as being a change and then a reversal of
>>> that
>>> change.
>>
>> But you could think of them as two independent changes, and set the
>> transition on each. I think that would be better than the UA trying
>> to guess
>> your intentions. I don't think I would expect it to run in reverse,
>> unless
>> (possibly, and that's the question) it hadn't finished running in
>> forward.
>> If you didn't set the :link version (or the no pseudo-class
>> version), then
>> unhovering would cause an abrupt change back. If that's what you
>> wanted (and
>> sometimes it might be), you'd be done; if not, you'd notice pretty
>> quick and
>> know what to do to fix it.
>
> Do you mean something like:
>
> a { transition-timing-function: ease-in; }
> a:hover { transition-timing-function: ease-out; }
>
Sure, according to your preference (if you set the timing function
for :hover and wanted something other than the default initial value
for going in reverse). Perhaps you'd prefer it to ease out in both
directions, for instance. Or you could have a different duration
depending on if you were going into the hover or coming out of it. I'd
think you'd want to set that yourself.
>
>> I can imagine, for instance, wanting a tooltip thingy that faded in
>> (with
>> opacity) after a second or two delay when hovering, and then
>> disappearing to
>> opacity:0 abruptly as soon as I moved the cursor away. If it was
>> only half
>> opaque, I would want the change back to be just as abrupt (with no
>> delay or
>> duration) as it would have been if the first transition had played
>> out. I
>> would expect that to happen if I didn't set any transition values
>> on the
>> :link, because the initial transition-duration without me setting
>> it would
>> be 0.
>
> Sure, you want a transition one way, and no transition the other way.
> I don't think that's going to be the common case, though. I think it
> should be handled by explicitly specifying such.
I think the least unexpected thing is to explicitly specify whenever
you want a value other than the initial value.
> By default, though,
> if I specified such a transition on a tooltip, I'd expect it to
> transition in reverse when I stopped hovering.
Well, I haven't been that involved in the transition and animation
discussions before this, so maybe I'm missing something, but I didn't
think CSS worked that way usually. I would expect the initial value to
be present on any state I didn't set a value for (such as the non-
hover in this example) with properties like 'transition-duration' or
'transition-timing-function'.
Received on Wednesday, 25 November 2009 02:55:58 UTC