mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Import CSS random function tests
This commit is contained in:
Notes:
github-actions[bot]
2025-12-01 11:02:40 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/65512f54037 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6707 Reviewed-by: https://github.com/AtkinsSJ ✅ Reviewed-by: https://github.com/gmta
@@ -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>
|
||||
Reference in New Issue
Block a user