testing/web-platform/tests/css/css-values/rlh-on-root-lengths.html
author Sotaro Ikeda <sotaro.ikeda.g@gmail.com>
Thu, 10 Jul 2025 00:10:09 +0000 (8 hours ago)
changeset 795941 23763b72c35abeead04f63e4503c28abc73d065d
parent 770185 d3abefa61179dcf09892d16a1cbc9718f0edaafc
permissions -rw-r--r--
Bug 1976135 - Remove nightly only limitation of pref gfx.webrender.layer-compositor r=gfx-reviewers,gw Differential Revision: https://phabricator.services.mozilla.com/D256379
<!DOCTYPE html>
<title>CSS Values and Units Test: Using rlh units in lengths on the root element</title>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#rlh">
<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>