mirror of
https://github.com/servo/servo.git
synced 2025-10-09 21:10:19 +01:00
- Update CSS tests to revision e05bfd5e30ed662c2f8a353577003f8eed230180. - Update web-platform-tests to revision a052787dd5c069a340031011196b73affbd68cd9.
46 lines
No EOL
1.3 KiB
HTML
46 lines
No EOL
1.3 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8" />
|
|
<title>CSS Flexible Box Test: Negative margins</title>
|
|
<link href="https://www.google.com/" rel="author" title="Google Inc." />
|
|
<link href="http://www.w3.org/TR/css-flexbox-1/#item-margins" rel="help" />
|
|
<link href="reference/negative-margins-001-ref.xht" rel="match" />
|
|
<meta content="Negative margins get floored at zero for intrinsic size computations" name="assert" />
|
|
<style>
|
|
.container {
|
|
width: 60px;
|
|
background-color: red;
|
|
line-height: 0px;
|
|
border: 3px black solid;
|
|
}
|
|
|
|
.flex {
|
|
display: inline-flex;
|
|
background-color: green;
|
|
}
|
|
|
|
.item {
|
|
width: 20px;
|
|
height: 10px;
|
|
background-color: green;
|
|
}
|
|
|
|
.first {
|
|
width: 40px;
|
|
}
|
|
|
|
.neg-marg {
|
|
margin-left: -40px;
|
|
}
|
|
</style>
|
|
</head><body>
|
|
<p>You should see a green rectangle with a black border, 60px wide. You should see no red.</p>
|
|
|
|
<div class="container">
|
|
<div class="flex">
|
|
<div class="item first"></div>
|
|
<div class="item neg-marg"></div>
|
|
<div class="item"></div>
|
|
</div>
|
|
</div>
|
|
|
|
</body></html> |