font-feature-settings-computed.html (1699B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Fonts Module Level 3: getComputedStyle().fontFeatureSettings</title> 6 <link rel="help" href="https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop"> 7 <meta name="assert" content="The computed value of font-feature-settings is a map, so any duplicates in the specified value must not be preserved."> 8 <!-- Note that this conflicts with the computed value being "as specified", which the summary shows. 9 See https://github.com/w3c/csswg-drafts/issues/8296#issuecomment-1377622802 --> 10 <script src="/resources/testharness.js"></script> 11 <script src="/resources/testharnessreport.js"></script> 12 <script src="/css/support/computed-testcommon.js"></script> 13 </head> 14 <style> 15 #container { 16 container-type: inline-size; 17 width: 100px; 18 } 19 </style> 20 </head> 21 <body> 22 <div id="container"> 23 <div id="target"></div> 24 </div> 25 <script> 26 test_computed_value('font-feature-settings', 'normal'); 27 28 test_computed_value('font-feature-settings', '"dlig"'); 29 test_computed_value('font-feature-settings', '"smcp"'); 30 test_computed_value('font-feature-settings', '"c2sc"'); 31 test_computed_value('font-feature-settings', '"liga" 0'); 32 test_computed_value('font-feature-settings', '"tnum", "hist"', '"hist", "tnum"'); 33 34 test_computed_value('font-feature-settings', '"PKRN"'); 35 36 test_computed_value('font-feature-settings', '"dlig", "smcp", "dlig" 0', '"dlig" 0, "smcp"'); 37 38 test_computed_value('font-feature-settings', '"liga" calc(10 + (sign(2cqw - 10px) * 5))', '"liga" 5'); 39 test_computed_value('font-feature-settings', '"liga" calc(10 + (sign(2cqw - 10px) * 5)), "dlig" calc(20 + (sign(2cqw - 10px) * 5))', '"dlig" 15, "liga" 5'); 40 41 </script> 42 </body> 43 </html>