WeasyPrint
WeasyPrint copied to clipboard
Right align in sample invoice
In the sample invoice the invoice number doesn't correctly align to the right, like the rest of the content. This seems to be related to the PDF rendering by weasyprint, because the source HTML + CSS renders the text correctly.
This seems to be related to the PDF rendering by weasyprint, because the source HTML + CSS renders the text correctly.
You're right. The space between the first dd and the second dt is included when calculating the dd's text position to align it right.
Sample to reproduce:
<style>
dl {
text-align: right;
}
dt, dd {
display: inline;
margin: 0;
}
dt::before {
content: '';
display: block;
}
</style>
<dl>
<dt>Test</dt>
<dd>12345</dd>
<dt>Test</dt>
<dd>12345</dd>
</dl>