Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-values/rlh-on-root-lengths.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Values and Units Test: Using rlh units in lengths on the root element</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
:root {
line-height: 73px;
padding-left: 2rlh;
}
</style>
<script>
test(() => {
assert_equals(getComputedStyle(document.documentElement).paddingLeft, "146px");
}, "Non font or line-height properties on :root should resolve rlh against :root line-height");
</script>