CSS dialog removes '@keyframes' from style tag and moves style attributes around (1.1) and Inkscape 1.2 crashes when opening the style dialog
Summary:
Inkscape removes CSS animations effectively.
Steps to reproduce:
- install https://gitlab.com/Moini/ink_line_animator
- open
- select heart object
- Extensions > Animation > Line Animator
- select animation and Apply
What happened?
- the extension appears to produce the correct output
- however, somewhere during the journey of the file, the style tag contents is mangled, so that no CSS animation is created.
For comparison:
Inkscape 1.0.x (reload page if you missed the animation):
Diff:
73,82c59,60
< id="pathanim_heart">
< #heart {
< animation-name: heart;
< stroke-dasharray: 250.15730977479575 !important;
< }
<
< @keyframes heart {
< 0%, 0% {stroke-dashoffset: 250.15730977479575;}
< 100.0%, 100% {stroke-dashoffset: 0;}
< }
---
> id="pathanim_heart">stroke-dashoffset: 0;stroke-dashoffset: 250.15730977479575;#heart { animation-name: heart; stroke-dasharray: 250.15730977479575 !important; }
> .heart { 0%, 0% }
So, somehow, the dashoffset animation parameters are parsed out and moved to the wrong place and the @keyframes
part is completely removed.
The style mangling can also be triggered by opening the file with the working animation from 1.0.x and then changing the stroke color of the heart (simple moving is not sufficient to trigger a style rewrite).
What should have happened?
Inkscape should not mess with my animations!
Version Info:
- Inkscape Version: Inkscape 1.1-rc (52f87abb86, 2021-05-02)
- Operating System: Linux Mint 20.1
Edited by Maren Hachmann