Skip to content

Commit

Permalink
Add inline-block and shrink-to-fit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikke89 committed Aug 6, 2020
1 parent d6144ed commit e4d1374
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Tests/Data/VisualTests/inline_block.rml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<rml>
<head>
<title>Inline-block</title>
<link type="text/rcss" href="../style.rcss"/>
<meta name="Description" content="Inline-block" />
<style>
body {
background: #ddd;
color: #444;
}
.float {
float: left;
color: #393;
}
.iblock {
display: inline-block;
color: #33c;
}
</style>
</head>

<body>
<div>The following text <div class="iblock">is an inline-block</div> and should flow naturally.</div>
<hr/>
<div>Left filler text <div class="iblock">meets an inline-block<br/>with a line-break</div> right filler text.</div>
<hr/>
<div>Left filler text. <div class="iblock">An inline-block. <p>A paragraph</p> Filler text.</div> Right filler text.</div>
<hr/>
<div>Left filler text. <div class="iblock">An inline-block. <div class="float">A float</div> Filler text.</div> Right filler text.</div>
</body>
</rml>
52 changes: 52 additions & 0 deletions Tests/Data/VisualTests/shrink_to_fit.rml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<rml>
<head>
<title>Shrink-to-fit</title>
<link type="text/rcss" href="../style.rcss"/>
<link rel="help" href="https://www.w3.org/TR/CSS21/visudet.html#shrink-to-fit-float" />
<meta name="Description" content="Shrink-to-fit width" />
<style>
body {
background: #ddd;
color: #444;
}
body > div {
clear: both;
position: relative;
height: 50px;
}
body > div > * {
border: 2px #888;
color: black;
background: #ccf;
}
.absolute {
position: absolute;
}
.float {
float: left;
}
.iblock {
display: inline-block;
}
</style>
</head>

<body>
<p>The following boxes should all appear the same, with the background and border tightly packed around the word 'BOX'.</p>
<div>
<span>BOX</span>
</div>
<div>
<div class="absolute">BOX</div>
</div>
<div>
<div class="float">BOX</div>
</div>
<div>
<span class="float">BOX</span>
</div>
<div>
<div class="iblock">BOX</div>
</div>
</body>
</rml>

0 comments on commit e4d1374

Please sign in to comment.