mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Import CSS random function tests
This commit is contained in:
parent
cd0976395a
commit
65512f5403
Notes:
github-actions[bot]
2025-12-01 11:02:40 +00:00
Author: https://github.com/Calme1709
Commit: 65512f5403
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6707
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/gmta
8 changed files with 746 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Values and Units Test: random() in @keyframes</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-values-5/#random">
|
||||
<script src="../../resources/testharness.js"></script>
|
||||
<script src="../../resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
@keyframes --anim {
|
||||
from {
|
||||
translate: 0px;
|
||||
translate: random(2px, 200px);
|
||||
}
|
||||
to {
|
||||
translate: 0px;
|
||||
}
|
||||
}
|
||||
#target {
|
||||
animation: --anim 1000s step-end;
|
||||
}
|
||||
</style>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test(() => {
|
||||
assert_not_equals(getComputedStyle(target).translate, "0px");
|
||||
}, "random() is not ignored in keyframe");
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue