blob: 1821c19a362495bd0bfc55c1935db98fd0b7edfa [file] [log] [blame]
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<!-- Merge these tests into upstream wpt test if/when added to the css-contain spec -->
<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/1031">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5796">
<link rel="match" href="fieldset-block-size-ref.html">
<p>The fieldset below has block-size containment. It should be wide enough to
contain the blue legend line, but not make any block-size room for the hotpink
square.</p>
<fieldset style="contain:block-size; border:20px solid; width:fit-content;">
<legend>
<div style="width:200px; height:2px; background:blue;"></div>
</legend>
<div style="width:100px; height:100px; background:hotpink;"></div>
</fieldset>