summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-block-formatting-context.html
blob: c38944ae795807628ce1c5cd114e5832263b2ff2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<title>The fieldset element: block formatting context</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<style>
* {
  margin: 0;
  padding: 0;
}
fieldset { border: none; }
.float {
  float: left;
  width: 50px;
  height: 50px;
  background-color: orange;
}
</style>

<div class=float></div>
<fieldset><div class=float></div></fieldset>

<script>
test(() => {
  const fieldset = document.querySelector('fieldset');
  assert_equals(fieldset.offsetTop, 0, 'fieldset.offsetTop');
  assert_equals(fieldset.offsetLeft, 50, 'fieldset.offsetLeft');
  assert_equals(fieldset.clientHeight, 50, 'fieldset.clientHeight');
});
</script>