contain-inline-size-fieldset.html (907B)
1 <!DOCTYPE html> 2 <title>contain:inline-size and fieldset</title> 3 <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> 4 <link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> 5 <link rel="help" href="https://drafts.csswg.org/css-contain-3/#containment-inline-size"> 6 <link rel="match" href="contain-inline-size-fieldset-ref.html"> 7 <p>The fieldset below has inline-size containment. It should not make any 8 inline-size room for the blue legend line, but it should fit the hotpink 9 square in the block direction (but not in the inline direction, where it 10 should overflow the right border of the fieldset.</p> 11 <fieldset style="contain:inline-size; border:20px solid; width:fit-content;"> 12 <legend> 13 <div style="width:200px; height:2px; background:blue;"></div> 14 </legend> 15 <div style="width:100px; height:100px; background:hotpink;"></div> 16 </fieldset>