blob: c866588f5a7706d516dad6f856e3eb01719920ba [file] [log] [blame]
<html>
<head>
<style>
:root {
--main-color: #c06;
--accent-background: linear-gradient(to top, var(--main-color), white);
}
</style>
<body>
<script>
document.body.offsetTop
document.write(getComputedStyle(document.documentElement).getPropertyValue("--accent-background") + "<br>")
document.documentElement.setAttribute("style", "--main-color:green")
document.write(getComputedStyle(document.documentElement).getPropertyValue("--accent-background"))
</script>
</body>
</html>