-
-
Notifications
You must be signed in to change notification settings - Fork 686
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
Multiple values for "text-decoration" are not applied correctly #1621
Comments
Thanks a lot for the bug report and the examples! It should be fixed (and tested) in master, real-life tests are welcome. |
Thank you for the reactivity. I can confirm that the case However all the other cases are still broken. Only the most nested value of |
Sorry, I shouldn’t have closed this issue. Only the first example is fixed. |
The CSS specification is full of surprises about inheritance. |
This bug is now closed, because all the examples given here are now rendered "correctly". But, even if the new behavior is better than the previous one, it’s far from perfect. Here are some examples of what don’t work yet:
Decorations are currently propagated to all children.
That’s not true for thickness (because of font-weight or font-size), that’s not true for color. If anyone needs this problem to be fixed, please open a new issue! Unfortunately, it will require more complicated code (and more time). |
(There’s one more bug that needs to be fixed, sorry…) |
(Tests now pass.) |
Great, I confirm that all the cases in this issue are fixed 🎉. Thank you very much. That CSS specification is definitively not simple 😅 Do you know when 55 is planned to be released ? For the non technical CSS people like me, here the visual impact of the non cover cases <div style="color: red;text-decoration: underline blue;">
a
<span style="text-decoration: line-through lime;">b</span>
c</div> <div style="color: red;text-decoration: underline blue;">a<span style="float: right;">b</span></div> |
You can expect a beta to be released in the next days / weeks. |
We have found a few cases where
text-decoration
values are not applied correctly: only a single value is possible at a time.The HTML output is based on Firefox 98 and the PDF is generated with
weasyprint==54.3
.Single Tag with multiple options
HTML
PDF
It used to work with
weasyprint==52.5
.Two tags with different options
HTML
PDF
Historical HTML tags
HTML
PDF
With other CSS properties
Other CSS properties like
color
orfont-weight
are applied aside only a single valuetext-decoration
:HTML
PDF
The text was updated successfully, but these errors were encountered: