tor-browser

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

hyphen-limit-chars-interpolation.html (1468B)


      1 <!DOCTYPE html>
      2 <link rel=author href="mailto:jkew@mozilla.com">
      3 <link rel=help href="https://drafts.csswg.org/css-text-4/#propdef-hyphenate-limit-chars">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/css/support/interpolation-testcommon.js"></script>
      7 
      8 <body>
      9 <script>
     10 test_interpolation({
     11  property: "hyphenate-limit-chars",
     12  from: "5 1 2",
     13  to: "17 5 10",
     14 }, [
     15  {at: -0.5, expect: "-1 -1 -2"},
     16  {at: -0.25, expect: "2 0"},
     17  {at: 0, expect: "5 1 2"},
     18  {at: 0.25, expect: "8 2 4"},
     19  {at: 0.5, expect: "11 3 6"},
     20  {at: 0.75, expect: "14 4 8"},
     21  {at: 1, expect: "17 5 10"},
     22  {at: 1.5, expect: "23 7 14"},
     23 ]);
     24 
     25 test_interpolation({
     26  property: "hyphenate-limit-chars",
     27  from: "auto 1 2",
     28  to: "auto 5 10",
     29 }, [
     30  {at: -0.5, expect: "auto -1 -2"},
     31  {at: -0.25, expect: "auto 0"},
     32  {at: 0, expect: "auto 1 2"},
     33  {at: 0.25, expect: "auto 2 4"},
     34  {at: 0.5, expect: "auto 3 6"},
     35  {at: 0.75, expect: "auto 4 8"},
     36  {at: 1, expect: "auto 5 10"},
     37  {at: 1.5, expect: "auto 7 14"},
     38 ]);
     39 
     40 test_interpolation({
     41  property: "hyphenate-limit-chars",
     42  from: "5",  // the missing values should both be 'auto'
     43  to: "17",
     44 }, [
     45  {at: -0.5, expect: "-1 auto"},
     46  {at: -0.25, expect: "2 auto"},
     47  {at: 0, expect: "5 auto"},
     48  {at: 0.25, expect: "8 auto"},
     49  {at: 0.5, expect: "11 auto"},
     50  {at: 0.75, expect: "14 auto"},
     51  {at: 1, expect: "17 auto"},
     52  {at: 1.5, expect: "23 auto"},
     53 ]);
     54 </script>