min-content-le-max-content.tentative.html (1016B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>min-content ≤ max-content</title> 4 <link rel="author" title="Oriol Brufau" href="obrufau@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes"> 6 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/12076"> 7 <meta assert="The max-content size is floored to not be smaller than the min-content."> 8 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 9 10 <style> 11 main { 12 width: 100px; 13 height: 100px; 14 font-size: 0; 15 background: red; 16 } 17 div { 18 background: green 19 } 20 span { 21 display: inline-block; 22 vertical-align: top; 23 height: 50px; 24 } 25 </style> 26 27 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 28 <main> 29 <div style="width: min-content"> 30 <span style="width: 100px"></span> 31 <span style="margin-right: -50px"></span> 32 </div> 33 <div style="width: max-content"> 34 <span style="width: 100px"></span> 35 <span style="margin-right: -50px"></span> 36 </div> 37 </main>