Skip to content

CSS instruction color: transparent not working any longer #811

@ThielAnComma

Description

@ThielAnComma

Describe the Bug

We migrated lately from 0.2.4 to 0.2.17. Table cells with css "color: transparent" are rendered in black now, whereas in the old version the cells was rendered "empty".

Minimal Example to Reproduce

We are using rst2pdf (0.103.1), so here is a minimal rst file:

.. raw:: html

<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
</head>

<table class="Projektbericht" repeat="2" style="font-family: Helvetica, Arial, sans-serif; font-size: 8pt; margin-top: 12px; width:20%;">
  <tbody>
            <tr class="odd" style="padding: 2px, 2px, 0, 2px; border: none">
                      <td class="right columnGroupStart" style="text-align: right; border-left: 1px solid #868686; background-color: #fff; ">42,00</td>
                      <td class="right" style="text-align: right; background-color: #fff; color: transparent;">0,00</td>
                    </tr>
  </tbody>
</table>
</html>

Expected Behavior

The first cell content should be visible, i.e. rendered in black, the second cell value "0,00" should not be visible, i.e. the cell should be rendered empty.

Actual Behavior

The transparent value of the color css attribute is ignored, the cell value is rendered in black.

Additional Information

I've tried to use the color "#0000", which is not supported, it results in this error message:
[ERROR] createpdf.py:604 Error generating document elements: Can only convert 3 and 4 sequences to color

System Information

OS version: Windows Server 2016 Standard
Python version: 3.13.5
XHTML2PDF version: 0.2.17

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions