layout: Support block-direction margins for inline-blocks.

Improves linux.com.
This commit is contained in:
Patrick Walton 2015-05-11 17:48:33 -07:00
parent 885068207f
commit 3875c9db4a
5 changed files with 61 additions and 5 deletions

View file

@ -137,6 +137,7 @@ flaky_cpu == append_style_a.html append_style_b.html
== incremental_inline_layout_a.html incremental_inline_layout_ref.html
!= inline_background_a.html inline_background_ref.html
== inline_block_baseline_a.html inline_block_baseline_ref.html
== inline_block_block_direction_margins_a.html inline_block_block_direction_margins_ref.html
== inline_block_border_a.html inline_block_border_ref.html
== inline_block_border_intrinsic_size_a.html inline_block_border_intrinsic_size_ref.html
== inline_block_img_a.html inline_block_img_ref.html

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
margin: 0;
}
span {
display: inline-block;
margin-top: 100px;
margin-bottom: 100px;
}
div {
background: steelblue;
color: white;
}
</style>
</head>
<body>
<div>Four <span>score</span>&nbsp;and seven years ago</div>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
margin: 0;
}
span {
display: inline-block;
}
div {
padding-top: 100px;
padding-bottom: 100px;
background: steelblue;
color: white;
}
</style>
</head>
<body>
<div>Four <span>score</span>&nbsp;and seven years ago</div>
</body>
</html>