You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WeasyPrint doesn't respect the max-width of td when there's a long word.
And WeasyPrint seems to ignore overflow-wrap: break-word; as well.
Example HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>WeasyPrint table-width test</title>
<style>
body {
max-width: 300px;
}
td {
max-width: 200px;
}
.break-word {
overflow-wrap: break-word;
}
</style>
</head>
<body>
<h3>With very long word</h3>
<p>Lorem ipsum dolor sit amet, verylongnamehere: Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Imperdiet massa tincidunt nunc pulvinar sapien et ligula ullamcorper. Nulla at volutpat diam ut venenatis.</p>
<h3>With very long word and overflow-wrap: break-word</h3>
<p class="break-word">Lorem ipsum dolor sit amet, verylongnamehere: Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Imperdiet massa tincidunt nunc pulvinar sapien et ligula ullamcorper. Nulla at volutpat diam ut venenatis.</p>
<h3>Without a very long word</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Imperdiet massa tincidunt nunc pulvinar sapien et ligula ullamcorper. Nulla at volutpat diam ut venenatis.</p>
<h3>Table with very long word</h3>
<table>
<tr>
<td>Lorem ipsum dolor sit amet, verylongnamehere: Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Imperdiet massa tincidunt nunc pulvinar sapien et ligula ullamcorper. Nulla at volutpat diam ut venenatis.</td>
</tr>
</table>
<h3>Table with very long word and overflow-wrap: break-word</h3>
<table>
<tr>
<td class="break-word">Lorem ipsum dolor sit amet, verylongnamehere: Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Imperdiet massa tincidunt nunc pulvinar sapien et ligula ullamcorper. Nulla at volutpat diam ut venenatis.</td>
</tr>
</table>
<h3>Table without a very long word</h3>
<table>
<tr>
<td>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Imperdiet massa tincidunt nunc pulvinar sapien et ligula ullamcorper. Nulla at volutpat diam ut venenatis.</td>
</tr>
</table>
</body>
</html>
Expected output (from Firefox):
WeasyPrint version 61.1 output:
The text was updated successfully, but these errors were encountered:
WeasyPrint doesn't respect the
max-width
oftd
when there's a long word.And WeasyPrint seems to ignore
overflow-wrap: break-word;
as well.Example HTML
Expected output (from Firefox):
WeasyPrint version 61.1 output:
The text was updated successfully, but these errors were encountered: