Skip to content

Table with borders and TD overflow acting strange #2635

@Justinas-Jurciukonis

Description

@Justinas-Jurciukonis
Image

I have simple table that should have border.
Border is on table row.
For every table cell, that has overflow: hidden border is drawn double or in darker color. This does not apply if border is on table data.

WeasyPrint version 61.1

<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style>
            table {
                display: inline-block;
                border-collapse: collapse;
                width: 45%;
                color: #bbc6cf;
            }

            table tr {
                border: 1px solid #e7ebef;
            }

            td {
                padding: 5px;
            }

            td.ovf {
                overflow: hidden;
                text-decoration: underline;
            }
        </style>
    </head>
    <body>
        <table>
            <tr>
                <td class="ovf">FIRST 1</td>
                <td>FIRST 2</td>
            </tr>
            <tr>
                <td class="ovf">SECOND 1</td>
                <td class="ovf">SECOND 2</td>
            </tr>
            <tr>
                <td>THIRD 1</td>
                <td>THIRD 2</td>
            </tr>
        </table>
        <table>
            <tr>
                <td>FIRST 1</td>
                <td>FIRST 2</td>
            </tr>
            <tr>
                <td>SECOND 1</td>
                <td>SECOND 2</td>
            </tr>
            <tr>
                <td>THIRD 1</td>
                <td>THIRD 2</td>
            </tr>
        </table>
    </body>
</html>

<img width="821" height="190" alt="Image" src="https://github.com/user-attachments/assets/42541219-0160-461d-b9a7-b2c56915a60c" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugExisting features not working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions