gecko-dev/layout/reftests/css-calc/offsets-absolute-bottom-1.html

25 lines
1.4 KiB
HTML

<!DOCTYPE HTML>
<title>Test for bottom:calc() on absolutely positioned elements</title>
<style>
body { margin: 0 }
body > div { float: left; margin-top: -90px; height: 100px; margin-bottom: 90px; width: 3px; position: relative }
div[style] { background: blue; position: absolute; height: 10px; width: 3px }
div.space { height: 100px }
</style>
<!-- tests with a fixed-height container -->
<div><div style="bottom: -moz-calc(-50px)"></div></div>
<div><div style="bottom: -moz-calc(-50%)"></div></div>
<div><div style="bottom: -moz-calc(-25px - 50%)"></div></div>
<div><div style="bottom: -moz-calc(-150% / 2 + 30px)"></div></div>
<div><div style="bottom: -moz-calc(-40px - 10% + 20% / 2)"></div></div>
<div><div style="bottom: -moz-calc(-40px + 10%)"></div></div>
<!-- tests with an auto-bottom container -->
<div><div><div style="bottom: -moz-calc(-50px)"></div><div class="space"></div></div></div>
<div><div><div style="bottom: -moz-calc(-50%)"></div><div class="space"></div></div></div>
<div><div><div style="bottom: -moz-calc(-25px - 50%)"></div><div class="space"></div></div></div>
<div><div><div style="bottom: -moz-calc(-150% / 2 + 30px)"></div><div class="space"></div></div></div>
<div><div><div style="bottom: -moz-calc(-40px - 10% + 20% / 2)"></div><div class="space"></div></div></div>
<div><div><div style="bottom: -moz-calc(-40px + 10%)"></div><div class="space"></div></div></div>