Skip to content

Commit

Permalink
Ignore margins in the block-flow direction
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan committed Aug 21, 2018
1 parent 7cc954a commit 4239ca2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<!doctype html>
<title>legend and margin (block-flow direction)</title>
<style>
body, fieldset { margin: 0; }
p { margin: 0; height: 50px; }
fieldset { border: 20px solid green; background: lime; }
div { margin-top: 100px; }
* { margin: 0; padding: 0; }
p { height: 50px; }
fieldset { border: 20px solid green; background: lime; padding: 10px; }
legend { height: 20px; }
</style>
<p>There should be no red.</p>
<div></div>
<fieldset><legend>margin-top</legend></fieldset>
<fieldset><legend>margin-bottom</legend><div></div></fieldset>
<fieldset><legend>margin-bottom</legend></fieldset>
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@
<title>legend and margin (block-flow direction)</title>
<link rel=match href=legend-margin-block-ref.html>
<style>
body, fieldset { margin: 0; }
p { margin: 0; height: 50px; }
* { margin: 0; padding: 0; }
p { height: 50px; }
fieldset { border: 20px solid green; background: lime; padding: 10px; }
legend { height: 20px; }
#top { margin-top: 100px; }
#bottom { margin-bottom: 100px; }
#bottom {
margin-bottom: 100px;
background: lime;
}
#gradient { background: linear-gradient(to bottom, lime 0, lime 50px, red 50px, red 100px); }
#behind {
position: absolute;
z-index: -1;
background: red;
left: 0;
right: 0;
top: 150px;
height: 220px;
top: 50px;
height: 110px;
}
</style>
<p>There should be no red.</p>
<div id=behind></div>
<fieldset><legend id=top>margin-top</legend></fieldset>
<fieldset><legend id=bottom>margin-bottom</legend></fieldset>
<fieldset id=gradient><legend id=bottom>margin-bottom</legend></fieldset>

0 comments on commit 4239ca2

Please sign in to comment.