blob: d7827f7e3b168c8dba088d7ab6eed43f2e4161bf [file] [edit]
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSSOM: :root selector parsed in getComputedStyle()</title>
<link rel="help" href="https://drafts.csswg.org/selectors/#root-pseudo">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle">
<style>
:root {
--a: red;
}
</style>
<script>
"use strict";
test(() => {
const a = getComputedStyle(document.documentElement).getPropertyValue("--a");
assert_equals(a, "red");
}, "Accessing variables in :root pseudo-selector");
</script>