font-weight-valid.html (1557B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Fonts Module Level 4: parsing font-weight with valid values</title> 6 <link rel="help" href="https://www.w3.org/TR/css-fonts-4/#font-weight-prop"> 7 <meta name="assert" content="font-weight supports the full grammar 'normal | bold | bolder | lighter | <number [1,1000]>'."> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="/css/support/parsing-testcommon.js"></script> 11 </head> 12 <body> 13 <script> 14 test_valid_value('font-weight', 'normal'); 15 test_valid_value('font-weight', 'bold'); 16 test_valid_value('font-weight', 'bolder'); 17 test_valid_value('font-weight', 'lighter'); 18 test_valid_value('font-weight', '1'); 19 test_valid_value('font-weight', '100'); 20 test_valid_value('font-weight', '200'); 21 test_valid_value('font-weight', '300'); 22 test_valid_value('font-weight', '400'); 23 test_valid_value('font-weight', '500'); 24 test_valid_value('font-weight', '600'); 25 test_valid_value('font-weight', '700'); 26 test_valid_value('font-weight', '800'); 27 test_valid_value('font-weight', '900'); 28 test_valid_value('font-weight', '1000'); 29 test_valid_value('font-weight', '101'); 30 test_valid_value('font-weight', '150.25'); 31 test_valid_value('font-weight', 'calc(100)'); 32 test_valid_value('font-weight', 'calc(0)'); 33 test_valid_value('font-weight', 'calc(-100)'); 34 test_valid_value('font-weight', 'calc(100 + 100)', 'calc(200)'); 35 test_valid_value('font-weight', 'calc(100 + (sign(20cqw - 10px) * 5))', 'calc(100 + (5 * sign(20cqw - 10px)))'); 36 </script> 37 </body> 38 </html>