tor-browser

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

text-box-computed.html (2774B)


      1 <!DOCTYPE html>
      2 <title>text-box getComputedStyle() returns correctly resolved values</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-text-box">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/css/support/computed-testcommon.js"></script>
      7 <div id="target"></div>
      8 <script>
      9 // initial values
     10 test_computed_value('text-box', 'normal');
     11 test_computed_value('text-box', 'none', 'normal');
     12 test_computed_value('text-box', 'none auto', 'normal');
     13 test_computed_value('text-box', 'auto none', 'normal');
     14 test_computed_value('text-box', 'auto', 'trim-both');
     15 
     16 // `<text-box-trim>`: `none | trim-start | trim-end | trim-both`
     17 test_computed_value('text-box', 'trim-start');
     18 test_computed_value('text-box', 'trim-end');
     19 test_computed_value('text-box', 'trim-both');
     20 
     21 // `<text-edge>`
     22 test_computed_value('text-box', 'text');
     23 test_computed_value('text-box', 'ideographic');
     24 test_computed_value('text-box', 'cap alphabetic');
     25 test_computed_value('text-box', 'text alphabetic');
     26 
     27 // Mix initial and non-initial values
     28 test_computed_value('text-box', 'trim-start auto', 'trim-start');
     29 test_computed_value('text-box', 'trim-both auto', 'trim-both');
     30 test_computed_value('text-box', 'auto trim-both', 'trim-both');
     31 test_computed_value('text-box', 'none text', 'none text');
     32 test_computed_value('text-box', 'text text none', 'none text');
     33 test_computed_value('text-box', 'none cap text');
     34 test_computed_value('text-box', 'cap alphabetic none', 'none cap alphabetic');
     35 test_computed_value('text-box', 'ideographic none', 'none ideographic');
     36 
     37 // Both `<text-box-trim>` and `<text-box-edge>`
     38 test_computed_value('text-box', 'trim-both text', 'text');
     39 test_computed_value('text-box', 'trim-start text');
     40 test_computed_value('text-box', 'text text trim-both', 'text');
     41 test_computed_value('text-box', 'text text trim-end', 'trim-end text');
     42 test_computed_value('text-box', 'cap alphabetic trim-start', 'trim-start cap alphabetic');
     43 test_computed_value('text-box', 'trim-start cap alphabetic');
     44 test_computed_value('text-box', 'trim-both cap alphabetic', 'cap alphabetic');
     45 test_computed_value('text-box', 'trim-start ideographic ideographic', 'trim-start ideographic');
     46 test_computed_value('text-box', 'trim-start ideographic-ink ideographic-ink', 'trim-start ideographic-ink');
     47 test_computed_value('text-box', 'trim-end cap text');
     48 test_computed_value('text-box', 'trim-end ex text', 'trim-end ex text');
     49 test_computed_value('text-box', 'cap text trim-end', 'trim-end cap text');
     50 test_computed_value('text-box', 'ex text trim-end', 'trim-end ex text');
     51 test_computed_value('text-box', 'cap text trim-both', 'cap text');
     52 test_computed_value('text-box', 'ex text trim-both', 'ex text');
     53 </script>