word-spacing-computed.html (1141B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Text: getComputedStyle().wordSpacing</title> 6 <link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-word-spacing"> 7 <meta name="assert" content="word-spacing computed value is an absolute length and/or percentage."> 8 <meta name="assert" content="'normal' computes to zero."> 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 <script src="/css/support/computed-testcommon.js"></script> 12 <style> 13 #target { 14 font-size: 40px; 15 } 16 </style> 17 </head> 18 <body> 19 <div id="target"></div> 20 <script> 21 test_computed_value("word-spacing", "normal", "0px"); 22 test_computed_value("word-spacing", "0", "0px"); 23 24 test_computed_value("word-spacing", "10px"); 25 test_computed_value("word-spacing", "-20px"); 26 test_computed_value("word-spacing", "calc(10px - 0.5em)", "-10px"); 27 test_computed_value("word-spacing", "110%"); 28 test_computed_value("word-spacing", "-5%"); 29 test_computed_value("word-spacing", "calc(10% - 20%)", "-10%"); 30 test_computed_value("word-spacing", "calc(10px - (5% + 10%)", "calc(-15% + 10px)"); 31 </script> 32 </body> 33 </html>