Skip to content

Commit

Permalink
[css-animations] animation-duration computed value (#13819)
Browse files Browse the repository at this point in the history
Durations are serialized in seconds.
https://drafts.csswg.org/css-values-4/#time
  • Loading branch information
ewilligers authored Nov 1, 2018
1 parent 96748a7 commit e920939
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
20 changes: 20 additions & 0 deletions css/css-animations/parsing/animation-delay-computed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Animations: getComputedValue().animationDelay</title>
<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-delay">
<meta name="assert" content="animation-delay converts to seconds.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("animation-delay", "-500ms", "-0.5s");
test_computed_value("animation-delay", "calc(2 * 3s)", "6s");
test_computed_value("animation-delay", "20s, 10s");
</script>
</body>
</html>
20 changes: 20 additions & 0 deletions css/css-animations/parsing/animation-duration-computed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Animations: getComputedValue().animationDuration</title>
<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-duration">
<meta name="assert" content="animation-duration converts to seconds.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("animation-duration", "500ms", "0.5s");
test_computed_value("animation-duration", "calc(2 * 3s)", "6s");
test_computed_value("animation-duration", "20s, 10s");
</script>
</body>
</html>
20 changes: 20 additions & 0 deletions css/css-transitions/parsing/transition-duration-computed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Transitions: getComputedValue().transitionDuration</title>
<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-duration">
<meta name="assert" content="transition-duration converts to seconds.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("transition-duration", "500ms", "0.5s");
test_computed_value("transition-duration", "calc(2 * 3s)", "6s");
test_computed_value("transition-duration", "20s, 10s");
</script>
</body>
</html>

0 comments on commit e920939

Please sign in to comment.