min-width-computed.html (1238B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS basic box model: getComputedStyle().minWidth</title> 6 <link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-width"> 7 <meta name="assert" content="min-width 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("min-width", "min-content"); 21 test_computed_value("min-width", "max-content"); 22 23 test_computed_value("min-width", "10px"); 24 test_computed_value("min-width", "20%"); 25 26 test_computed_value('min-width', 'calc(10% + 40px)'); 27 test_computed_value('min-width', 'calc(10px - 0.5em)', '0px'); 28 test_computed_value('min-width', 'calc(10px + 0.5em)', '30px'); 29 30 test_computed_value("min-width", "fit-content(10px)"); 31 test_computed_value("min-width", "fit-content(20%)"); 32 test_computed_value("min-width", "fit-content(calc(10% + 40px))"); 33 test_computed_value("min-width", "fit-content(calc(10px + 0.5em))", "fit-content(30px)"); 34 </script> 35 </body> 36 </html>