rlh-on-root-lengths.html (573B)
1 <!DOCTYPE html> 2 <title>CSS Values and Units Test: Using rlh units in lengths on the root element</title> 3 <link rel="help" href="https://drafts.csswg.org/css-values-4/#rlh"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <style> 7 :root { 8 line-height: 73px; 9 padding-left: 2rlh; 10 } 11 </style> 12 <script> 13 test(() => { 14 assert_equals(getComputedStyle(document.documentElement).paddingLeft, "146px"); 15 }, "Non font or line-height properties on :root should resolve rlh against :root line-height"); 16 </script>