max-height-computed.html (1295B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS basic box model: getComputedStyle().maxHeight</title> 6 <link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-height"> 7 <meta name="assert" content="max-height computed value is as specified, with <length-percentage> values computed"> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="/css/support/computed-testcommon.js"></script> 11 <style> 12 #target { 13 font-size: 40px; 14 } 15 </style> 16 </head> 17 <body> 18 <div id="target"></div> 19 <script> 20 test_computed_value("max-height", "none"); 21 test_computed_value("max-height", "min-content"); 22 test_computed_value("max-height", "max-content"); 23 24 test_computed_value("max-height", "10px"); 25 test_computed_value("max-height", "20%"); 26 27 test_computed_value('max-height', 'calc(10% + 40px)'); 28 test_computed_value('max-height', 'calc(10px - 0.5em)', '0px'); 29 test_computed_value('max-height', 'calc(10px + 0.5em)', '30px'); 30 31 test_computed_value("max-height", "fit-content(10px)"); 32 test_computed_value("max-height", "fit-content(20%)"); 33 test_computed_value("max-height", "fit-content(calc(10% + 40px))"); 34 test_computed_value("max-height", "fit-content(calc(10px + 0.5em))", "fit-content(30px)"); 35 </script> 36 </body> 37 </html>