mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02:00
Tests: Import WPT tests for CSS env()
This commit is contained in:
committed by
Alexander Kalenik
parent
5808eff1f4
commit
b03e829a49
Notes:
github-actions[bot]
2025-08-07 14:42:02 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/b03e829a498 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5736 Reviewed-by: https://github.com/kalenikaliaksandr
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-env-1/">
|
||||
<title>Test that nested var() fallback values work with CSS env vars</title>
|
||||
<script src="../../resources/testharness.js"></script>
|
||||
<script src="../../resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
body {
|
||||
--main-bg-color: rgb(0, 128, 0);
|
||||
background-color: env(test, var(--main-bg-color));
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test(() => {
|
||||
const style = window.getComputedStyle(document.body);
|
||||
assert_equals(style.getPropertyValue("background-color"), "rgb(0, 128, 0)");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user