tor-browser

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

text-wrap-balance-right-to-left.html (1123B)


      1 <!DOCTYPE html>
      2 <link rel="help" href="https://drafts.csswg.org/css-text-4/#text-wrap">
      3 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
      4 
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <style>
      8 #container {
      9  width: 20ch;
     10 }
     11 .balance {
     12  text-wrap: balance;
     13 }
     14 </style>
     15 <div id="container" dir="rtl" lang="AR"></div>
     16 <script>
     17 const container = document.getElementById('container');
     18 for (const text of [
     19    'ينبغي تحقيق التوازن',
     20    'يجب ألا تؤدي موازنة التفاف النص إلى تغيير عدد الأسطر',
     21    'يجب ألا تؤدي موازنة التفاف النص إلى تغيير عدد الأسطر لهذه الفقرة النصية',
     22  ]) {
     23  const normal = document.createElement('div');
     24  const balance = document.createElement('div');
     25  normal.textContent = text;
     26  balance.textContent = text;
     27  balance.classList.add('balance');
     28  container.appendChild(normal);
     29  container.appendChild(balance);
     30  test(() => {
     31    assert_equals(normal.offsetHeight, balance.offsetHeight);
     32  });
     33 }
     34 </script>