blob: b1921b1701558785dab7f2ca9856d2016c7a02f2 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="assert" content="This checks that 'box-sizing: border-box' doesn't have any effect on a positioned element when the height is set by the offset properties.">
<link rel="stylesheet" href="../css-intrinsic-dimensions/resources/width-keyword-classes.css">
<link rel="stylesheet" href="../css-intrinsic-dimensions/resources/height-keyword-classes.css">
<style>
.wrapper {
position: relative;
width: 200px;
height: 200px;
}
.positioned {
border: 10px solid magenta;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.fill-available {
border: 20px dotted cyan;
background: yellow;
}
.border-box {
box-sizing: border-box;
}
</style>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/check-layout-th.js"></script>
<body onload="checkLayout('.wrapper')">
<div id="log"></div>
<div class="wrapper" data-expected-width="200" data-expected-height="200">
<div class="positioned" data-expected-width="200" data-expected-height="200">
<div class="fill-available" data-expected-width="180" data-expected-height="180"></div>
</div>
</div>
<div class="wrapper" data-expected-width="200" data-expected-height="200">
<div class="positioned" data-expected-width="200" data-expected-height="200">
<div class="fill-available border-box" data-expected-width="180" data-expected-height="180"></div>
</div>
</div>
<div class="wrapper" data-expected-width="200" data-expected-height="200">
<div class="positioned border-box" data-expected-width="200" data-expected-height="200">
<div class="fill-available" data-expected-width="180" data-expected-height="180"></div>
</div>
</div>
<div class="wrapper" data-expected-width="200" data-expected-height="200">
<div class="positioned border-box" data-expected-width="200" data-expected-height="200">
<div class="fill-available border-box" data-expected-width="180" data-expected-height="180"></div>
</div>
</div>
</body>