summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-contain/contain-inline-size-fieldset.html
blob: 036bffe802a24a77e4ae7768fddb456fbc2848d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html>
<title>contain:inline-size and fieldset</title>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property">
<link rel="help" href="https://drafts.csswg.org/css-contain-3/#containment-inline-size">
<link rel="match" href="contain-inline-size-fieldset-ref.html">
<p>The fieldset below has inline-size containment. It should not make any
  inline-size room for the blue legend line, but it should fit the hotpink
  square in the block direction (but not in the inline direction, where it
  should overflow the right border of the fieldset.</p>
<fieldset style="contain:inline-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>