tor-browser

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

calc-in-font-feature-settings.html (872B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSS Test: calc() function in font-feature-settings</title>
      4 <link rel="author" title="Chris Nardi" href="mailto:cnardi@chromium.org">
      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-feature-settings: "vert" calc(2);
     11    }
     12 </style>
     13 <div id="test"></div>
     14 <script>
     15    const div = document.querySelector("#test");
     16    // Chrome serializes font-feature-settings with single quotes vs. double quotes
     17    // in other browsers, but that's not the issue being tested.
     18    const expected = ["'vert' 2", "\"vert\" 2"];
     19    test(function() {
     20        assert_in_array(getComputedStyle(div).fontFeatureSettings, expected);
     21    }, "calc() in font-feature-settings");
     22 </script>