We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I've discovered that fill property in CSS class is ignored for SVG. In the same example using fill with style or as property works fine.
Code:
<!DOCTYPE html PUBLIC "-//OPENHTMLTOPDF//DOC XHTML Character Entities Only 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/> <title>Icons</title> <style type="text/css"> @page { size: A4; margin: 16px; } .mb-2 { margin-bottom: 16px; } .icon { fill: #FF6347; } </style> </head> <body> <div class="mb-2"> Icon - fill property:</div> <div class="mb-2"> <svg height="16" width="16" viewBox="0 0 16 16" fill="#FF6347" xmlns="http://www.w3.org/2000/svg"> <path d="M8 0l2.5 5.3 5.5.8-4 4.1.9 5.8L8 13.3 3.1 16l.9-5.8-4-4.1 5.5-.8z" fill-rule="evenodd"></path> </svg> </div> <div class="mb-2"> Icon - fill style:</div> <div class="mb-2"> <svg height="16" width="16" viewBox="0 0 16 16" style="fill: #FF6347;" xmlns="http://www.w3.org/2000/svg"> <path d="M8 0l2.5 5.3 5.5.8-4 4.1.9 5.8L8 13.3 3.1 16l.9-5.8-4-4.1 5.5-.8z" fill-rule="evenodd"></path> </svg> </div> <div class="mb-2"> Icon - fill class:</div> <div class="mb-2"> <svg class="icon" height="16" width="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <path d="M8 0l2.5 5.3 5.5.8-4 4.1.9 5.8L8 13.3 3.1 16l.9-5.8-4-4.1 5.5-.8z" fill-rule="evenodd"></path> </svg> </div> </body> </html>
The result:
As you see, in last case the star is black.
The text was updated successfully, but these errors were encountered:
hi @mndzielski this is a limitation in how the "copy the css to svg backend" has been implemented. See: #515 .
As a workaround you can use:
.icon > path { fill: #FF6347; }
Sorry, something went wrong.
Hi @syjer, it works fine since version 1.0.4
Please update documentation for another users, thanks
No branches or pull requests
Hi,
I've discovered that fill property in CSS class is ignored for SVG. In the same example using fill with style or as property works fine.
Code:
The result:
As you see, in last case the star is black.
The text was updated successfully, but these errors were encountered: