font-variation-settings-computed.html (1516B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Fonts Module Level 3: getComputedStyle().fontVariationSettings</title> 6 <link rel="help" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-variation-settings"> 7 <meta name="assert" content="font-variation-settings computed value is as specified."> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="/css/support/computed-testcommon.js"></script> 11 </head> 12 <body> 13 <div id="target"></div> 14 <script> 15 test_computed_value('font-variation-settings', 'normal'); 16 17 test_computed_value('font-variation-settings', '"wght" 700'); 18 test_computed_value('font-variation-settings', '"AB@D" 0.5'); 19 20 test_computed_value('font-variation-settings', '"wght" 700, "wght" 500', '"wght" 500', 21 "duplicate values should be removed, keeping the rightmost occurrence."); 22 23 test_computed_value('font-variation-settings', '"wght" 700, "XHGT" 0.7', 24 ['"wght" 700, "XHGT" 0.7', '"XHGT" 0.7, "wght" 700']); 25 26 test_computed_value('font-variation-settings', '"wght" 100, "wdth" 200', '"wdth" 200, "wght" 100', 27 "values should be sorted alphabetically by tag."); 28 29 test_computed_value('font-variation-settings', '"wght" 100, "wdth" 200, "wght" 300, "wdth" 400', '"wdth" 400, "wght" 300', 30 "duplicate values should be removed, keeping the rightmost occurrence, and sorted alphabetically by tag."); 31 32 test_computed_value('font-variation-settings', '"XHGT" calc(0.4 + 0.3)', '"XHGT" 0.7'); 33 </script> 34 </body> 35 </html>