Bug 190179 - css animation-duration ignored on hover, but respected on viewport change
Summary: css animation-duration ignored on hover, but respected on viewport change
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 11
Hardware: Mac macOS 10.14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-01 17:32 PDT by cdaringe
Modified: 2022-02-01 03:12 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cdaringe 2018-10-01 17:32:11 PDT
similar symptoms, different causality report: https://bugs.webkit.org/show_bug.cgi?id=181242

safari ignores animation-duration using the :hover psuedo-class when overwriting an existing duration property.

this is easily demonstrable as shown here: https://youtu.be/F7RpRXddUfI

observe in the video:

- an initial, 240s animation-duration (e.g. slow rotation of the image)
- selection of the :hover class, setting animation-duration to 1.5s.  the rotation speed _does not change_ to a fast rotation.
- toggling away and back from the affected tab. suddenly, the animation-duration is honored, and fast rotation is achieved
- ...the exercise repeats with another value
Comment 1 Antoine Quint 2018-10-05 11:27:37 PDT
Could you provide a reduction?
Comment 2 Radar WebKit Bug Importer 2018-10-05 11:29:28 PDT
<rdar://problem/45048659>
Comment 3 cdaringe 2018-10-06 21:25:06 PDT
ya, sure thing.  here you go: https://codepen.io/cdaringe/pen/gBwZKR
Comment 4 cdaringe 2018-10-06 21:26:54 PDT
in its totality:

<div class='box' />

.box {
  animation-duration: 60000ms;
  animation-iteration-count: infinite;
  animation-name: spin;
  animation-timing-function: linear;
  width: 100px;
  height: 100px;
  background-color: black;
}

.box:hover {
  animation-duration: 1500ms;
  background-color: pink;
}

@keyframes spin {
  from {transform:rotate(0deg);}
  to {transform:rotate(360deg);}
}
Comment 5 Sam Sneddon [:gsnedders] 2022-02-01 03:12:17 PST
This appears to work nowadays.