font-style-valid.html (1548B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Fonts Module Level 4: parsing font-style with valid values</title> 6 <link rel="help" href="https://www.w3.org/TR/css-fonts-4/#font-style-prop"> 7 <meta name="assert" content="font-style supports the full grammar 'normal | italic | oblique <angle [-90deg,90deg]>?'."> 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-style', 'normal'); 15 test_valid_value('font-style', 'italic'); 16 test_valid_value('font-style', 'oblique'); 17 18 test_valid_value('font-style', 'oblique 0deg', 'normal'); 19 test_valid_value('font-style', 'oblique calc(10deg - 10deg)', 'oblique calc(0deg)'); 20 21 test_valid_value('font-style', 'oblique 10deg'); 22 test_valid_value('font-style', 'oblique -10deg'); 23 test_valid_value('font-style', 'oblique 14deg'); 24 test_valid_value('font-style', 'oblique -14deg'); 25 test_valid_value('font-style', 'oblique -90deg'); 26 test_valid_value('font-style', 'oblique 90deg'); 27 test_valid_value('font-style', 'oblique 10grad'); 28 test_valid_value('font-style', 'oblique calc(90deg)'); 29 test_valid_value('font-style', 'oblique calc(100deg)'); 30 test_valid_value('font-style', 'oblique calc(-100deg)'); 31 test_valid_value('font-style', 'oblique calc(30deg * 2)', 'oblique calc(60deg)'); 32 test_valid_value('font-style', 'oblique calc(30deg + (sign(2cqw - 10px) * 5deg))', 'oblique calc(30deg + (5deg * sign(2cqw - 10px)))'); 33 </script> 34 </body> 35 </html>