tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

calc-in-font-variation-settings.html (854B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSS Test: calc() function in font-variation-settings</title>
      4 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
      5 <link rel="help" href="https://drafts.csswg.org/css-values/#funcdef-calc">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <style>
      9 #test {
     10  font-variation-settings: "XHGT" calc(0.7);
     11 }
     12 </style>
     13 <div id="test"></div>
     14 <script>
     15 const div = document.querySelector("#test");
     16 test(function() {
     17  assert_equals(div.style.fontVariationSettings, "\"XHGT\" calc(0.7)");
     18 }, "calc() specified value serialization in font-variation-settings");
     19 test(function() {
     20  assert_equals(getComputedStyle(div).fontVariationSettings, "\"XHGT\" 0.7");
     21 }, "calc() computed value serialization in font-variation-settings");
     22 </script>