Ojan Vafai 4ecaa91c6c Remove margin collapsing.
Margin collapsing is a document-oriented feature. For applications
it just causes confusion and slowness.

margins.sky has failure output because offsetTop is returning the
wrong values. That's not new with this patch though. When I look
at it visually in skydb, everything seems to be in the right place.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/700743002
2014-11-03 21:30:40 -08:00

24 lines
660 B
Plaintext

<sky>
<import src="../resources/check-layout.sky" as="checkLayout" />
<style>
.root {
margin: 5px;
}
.child {
margin: 10px;
height: 30px;
}
</style>
<div class="root" data-expected-height="100" data-total-y="5" style="background-color: pink">
<!-- TODO(ojan): These numbers are right, but the test fails because we appear to have
broken offsetTop to not include the parent's margin-top. -->
<div class="child" data-total-y="15" style="background-color: salmon"></div>
<div class="child" data-total-y="65" style="background-color: papayawhip"></div>
</div>
<script>
checkLayout('.root');
</script>
</sky>