Skip to content

Instantly share code, notes, and snippets.

@alcinos
Last active August 29, 2015 14:23
Show Gist options
  • Save alcinos/a0a88c4ec735e62deacf to your computer and use it in GitHub Desktop.
Save alcinos/a0a88c4ec735e62deacf to your computer and use it in GitHub Desktop.
Small testcase on which weasyprint fails
.empty-col{
border-left:2px solid #646464;
border-right: 2px solid #646464;
border-bottom: 2px solid #646464;
background-color:#EFEDE6;
line-height:0px;
padding-top:0px;
position:relative;
}
.table{
border: none;
}
.sheader{
border: 2px solid;
border-color: #646464;
text-align:center;
background-color: #646464;
color:#FFFFFF;
}
.pheader{
text-align:center;
border-right: 2px solid;
border-left: 2px solid;
background-color:#BDBDBD;
border-color: #646464;
min-width:175px;
}
.istyle-fixed{
left:0px;
position:absolute;
width:100%;
border: 1px solid;
}
.empty-row{
border-bottom: 1px solid #C8C4B7;
left:0px;
background:none;
background-color:#EFEDE6;
position:absolute;
width:100%;
}
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="failing.css">
<style>
</style>
<title>Test</title>
<body>
<h1 style="text-align:center;font-size: 22px;margin-top: 0px;margin-bottom: 5px;">Title</h1>
<table id="planning" class="table table" style="border-spacing: 0; border-collapse: separate;height:100%;">
<colgroup>
<col style="width:28px;">
<col style="width:62px;" span="1">
</colgroup>
<tbody>
<tr style="border:none;">
<th style="border:0 none;"></th>
<th class="sheader" colspan="6">
<span class="">Date</span>
<div style="margin-left:auto;margin-right:auto;">Comment</div>
</th>
<th class="sect36 sep" style="border: none;" rowspan="26"></th>
</tr>
<tr>
<th style="border:0 none;"></th>
<th class="pheader sect36 post34" style="border-left:2px solid #646464;;min-width:0px">
<div style="position:relative;">
<span>Billeterie</span>
</div>
</th>
</tr>
<tr id="first-row" style="height:30px;">
<td style="border-left:2px solid #646464;border-top: 2px solid #646464;">21:00</td>
<td class="empty-col" style="padding:0px; border-left:2px solid #646464;" rowspan="24">
<div class="empty-row" style="height:30px; top:0px; border-top: 1px solid #C8C4B7;"></div>
<div class="empty-row" style="height:30px; top:30px; border-top: 1px solid #C8C4B7;"></div>
<div class="empty-row" style="height:30px; top:60px; border-top: 1px solid #C8C4B7;"></div>
<div class="empty-row" style="height:30px; top:90px; border-top: 1px solid #C8C4B7;"></div>
<div class="empty-row" style="height:30px; top:120px; border-top: 1px solid #C8C4B7;"></div>
<div class="empty-row" style="height:30px; top:150px; border-top: 1px solid #C8C4B7;"></div>
<div class="empty-row" style="height:30px; top:180px; border-top: 1px solid #C8C4B7;border-bottom:2px solid #646464;"></div>
<div style="height: 30.0px; top: 90.0px; line-height:1; background: none 0px 0px repeat scroll rgb(255, 255,255); border:none; border-top:1px solid; border-bottom:1px solid;" class="istyle-fixed">
person2,
</div>
<div style="height: 30.0px; top: 120.0px; line-height:1; background: none 0px 0px repeat scroll rgb(255, 255,255); border:none; border-top:1px solid; border-bottom:1px solid;" class="istyle-fixed">
</div>
<div style="height: 30.0px; top: 150.0px; line-height:1; background: none 0px 0px repeat scroll rgb(255, 255,255); border:none; border-top:1px solid; border-bottom:1px solid;" class="istyle-fixed">
</div>
<div style="height: 30.0px; top: 0.0px; line-height:1; background: none 0px 0px repeat scroll rgb(255, 255,255); border:none; border-top:1px solid; border-bottom:1px solid;" class="istyle-fixed">
person1
</div>
<div style="height: 30.0px; top: 30.0px; line-height:1; background: none 0px 0px repeat scroll rgb(255, 255,255); border:none; border-top:1px solid; border-bottom:1px solid;" class="istyle-fixed">
person3
</div>
<div style="height: 30.0px; top: 60.0px; line-height:1; background: none 0px 0px repeat scroll rgb(255, 255,255); border:none; border-top:1px solid; border-bottom:1px solid;" class="istyle-fixed">
person4
</div>
</td>
</tr>
<tr style="height:30px;">
<td style="border-left:2px solid #646464;border-right: none; border-top: 1px solid #ddd;">22:00</td>
</tr>
<tr style="height:30px;">
<td style="border-left:2px solid #646464;border-right: none; border-top: 1px solid #ddd;">23:00</td>
</tr>
<tr style="height:30px;">
<td style="border-left:2px solid #646464;border-right: none; border-top: 1px solid #ddd;">0:00</td>
</tr>
<tr style="height:30px;">
<td style="border-left:2px solid #646464;border-right: none; border-top: 1px solid #ddd;">1:00</td>
</tr>
<tr style="height:30px;">
<td style="border-left:2px solid #646464;border-right: none; border-top: 1px solid #ddd;">2:00</td>
</tr>
<tr style="height:30px;">
<td style="border-left:2px solid #646464;border-right:none;border-bottom: 2px solid #646464; border-top: 1px solid #ddd;">3:00</td>
</tr>
</tbody>
</table>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment