Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table cell min-width is ignored when another cell has overflowing text #1383

Closed
mikeroll opened this issue Jun 17, 2021 · 0 comments · Fixed by #1895
Closed

Table cell min-width is ignored when another cell has overflowing text #1383

mikeroll opened this issue Jun 17, 2021 · 0 comments · Fixed by #1895
Labels
bug Existing features not working as expected
Milestone

Comments

@mikeroll
Copy link

mikeroll commented Jun 17, 2021

Two tables here to compare, note the min-width css rule:

<head>
<style>
table td { border: 1px solid black; }
table.key-val tr td:nth-child(1) { min-width: 13em; }
</style>
</head>

<body>
<table class="key-val">
    <tbody>
        <tr>
            <td>Normal Key 1</td>
            <td>Normal Value 1</td>
        </tr>
        <tr>
            <td>Normal Key 2</td>
           <td>Normal Value 2</td>
        </tr>
    </tbody>
</table>
<br>
<table class="key-val">
    <tbody>
        <tr>
            <td>Short value</td>
            <td>Works as expected</td>
        </tr>
        <tr>
            <td>Long Value</td>
            <td>Annoyingly breaks my table layout: Sed ut perspiciatis unde omnis iste natus error sit voluptatem
                accusantium doloremque laudantium, totam rem aperiam,
                eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
            </td>
        </tr>
    </tbody>
</table>
</body>

Firefox:
image

Weasyprint:
image

I have experimented with different width units as well as tried adjusting overflow-wrap with no effect on Weasyprint's result.

@mikeroll mikeroll changed the title Table cell min-width is ignored when another cell has overflowing text. Table cell min-width is ignored when another cell has overflowing text Jun 17, 2021
@liZe liZe added the bug Existing features not working as expected label Jul 16, 2021
@liZe liZe added this to the 60.0 milestone Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants