blob: 9ec1c3f0116ed14adb75afb11dc776230f66c3b5 (
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
30
31
32
33
34
|
<!DOCTYPE html>
<title>Tests the calculation of negative auto margins of absolutely positioned element</title>
<link rel="help" href="https://drafts.csswg.org/css-position/#abspos-margins">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1492323">
<link rel="author" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<style>
.cb {
position: relative;
width: 400px;
height: 400px;
outline: 1px dashed black;
}
.target {
writing-mode: vertical-lr;
position: absolute;
background: green;
width: calc(100% - 100px);
height: calc(100% - 100px);
inset: 100px;
margin: auto;
}
</style>
<body onload="checkLayout('.target')">
<div class="cb">
<div class="target"
data-expected-margin-top="-50" data-expected-margin-bottom="-50"
data-expected-margin-left="0" data-expected-margin-right="-100"></div>
</div>
</body>
|