Re: [css-transitions] starting of transitions.

On Wednesday 2013-02-20 19:54 -0800, Andrew Fedoniouk wrote:
> I've the question reading this section
> http://www.w3.org/TR/css3-transitions/#starting
> 
> Let's assume I have these two rules:
> 
> a:link { color:red; transition: color 1s linear; }
> a:link:hover { color:blue; transition: color 2s ease;  }
> 
> so there are two types of animations: for entering :hover state
> and leaving it.
> 
> Question is: what timing function will be used when
> <a> gets :hover state?

'2s ease'

> And the same one for :not(:hover) state.

'1s linear'

> The section above in my opinion is not clear enough on this.

To the end of the first paragraph, I'll add the text:

  # This means that when one of these 'transition-*' properties
  # changes at the same time as a property whose change might
  # transition, it is the <em>new</em> values of the 'transition-*'
  # properties that control the transition.

Does that help?

> There are two options for entering :hover state:
> 1. use 'linear' from previous state or,
> 2. use 'ease' from that :hover state we are in.

It's always the destination state.

> If #1 then declaration:
>    a:link:hover { color:blue; transition: color 2s ease;  }
> 
> looks a bit misleading, isn't it?

Perhaps it does, but if implementations agree I think authors won't
have too much trouble figuring it out.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Thursday, 21 February 2013 04:08:28 UTC