Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<meta charset="utf-8">
<title>light-dark() in custom property whose light value equals the registered initial-value</title>
<link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html">
<style>
@property --test-color {
syntax: "<color>";
inherits: true;
initial-value: red;
}
.square {
width: 100px;
height: 100px;
color-scheme: dark;
--test-color: light-dark(red, green);
background-color: var(--test-color);
}
</style>
<p>Test passes if there is a filled green square.</p>
<div class="square"></div>