Skip to content

Commit 61561c7

Browse files
committed
Add a test on max-height
DEVSIX-5178
1 parent de95e27 commit 61561c7

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

src/test/java/com/itextpdf/html2pdf/css/DisplayFlexTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,11 @@ public void paragraphAndDivItemsOverflowBottomTest() throws IOException, Interru
476476
convertToPdfAndCompare("paragraphAndDivItemsOverflowBottom", SOURCE_FOLDER, DESTINATION_FOLDER);
477477
}
478478

479+
@Test
480+
public void smallHeightAndBigMaxHeightOnContainerTest() throws IOException, InterruptedException {
481+
convertToPdfAndCompare("smallHeightAndBigMaxHeightOnContainer", SOURCE_FOLDER, DESTINATION_FOLDER);
482+
}
483+
479484
private static void assertDiv(IElement element, String text) {
480485
Assert.assertTrue(element instanceof Div);
481486
Assert.assertEquals(1, ((Div) element).getChildren().size());
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
<head>
4+
<style>
5+
div { width: 200px; }
6+
div.flexbox {
7+
border: 1px dashed blue;
8+
background: lightgreen;
9+
font-size: 10px;
10+
display: flex;
11+
}
12+
</style>
13+
</head>
14+
<body>
15+
16+
<div class="flexbox" style="height: 2px; max-height: 100px; background-color: blue;">
17+
<div style="background-color:yellow;">text<br/>text<br/>text<br/>text<br/>text<br/></div>
18+
</div>
19+
20+
</body>
21+
</html>

0 commit comments

Comments
 (0)