-
Notifications
You must be signed in to change notification settings - Fork 250
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
Adding support to style attributes in SVG files #419
Conversation
Codecov Report
@@ Coverage Diff @@
## master #419 +/- ##
==========================================
+ Coverage 91.19% 91.32% +0.13%
==========================================
Files 22 22
Lines 6347 6238 -109
Branches 1282 1253 -29
==========================================
- Hits 5788 5697 -91
+ Misses 315 305 -10
+ Partials 244 236 -8
Continue to review full report at Codecov.
|
Note that currently the GitHub Actions pipeline is failing because your code is not formatted with Just run |
@allcontributors please add @RedShy for code |
I've put up a pull request to add @RedShy! 🎉 |
This looks great! There are few remaining things that would be great to add to this PR:
|
Merging now, thank you for your contribution @RedShy! |
Thank you! it's very rewarding having someone that is supportive and reviews so fast on the other hand! |
Thanks 😊 I hope you liked making this first contribution to an open source project, |
This feature has been included in the new v2.5.5 release! |
I implemented the support for SVG with CSS styling elements simply by parsing the style attribute and inserting the key-value pairs as attributes of the element and then reusing the existing code. Close #404
I tested it using the SVG files downloadable from Ghostscript examples and it works! There are some with linear gradient not supported but the others seems to be okay.
I added some tests in test_svg.py to cover the new feature.
I also have added simple tests for the file transitions.py given that was the least covered with the aim of increase test coverage.
Checklist:
The GitHub pipeline is OK (green),
meaning that both
pylint
(static code analyzer) andblack
(code formatter) are happy with the changes of this PR.A unit test is covering the code added / modified by this PR
This PR is ready to be merged
In case of a new feature, docstrings have been added, with also some documentation in the
docs/
folderA mention of the change is present in
CHANGELOG.md
The PR description or comment contains a picture of a cute animal (not mandatory but encouraged 😉)