CSS style is ignored when copying objects with a class into another document if grouped
Steps to reproduce:
- open Inkscape
- open file visio_exported_svg.svg (attached)
- hit ctrl-C for copying a box with text(see image1)
- open a new file
- hit ctrl-V for pasting
What happened?
- in the new file, the box with text become black-filled (see attached image2)
What should have happened?
- the box with text should not be black-filled
Inkscape Version and Operating System:
- Inkscape Version: Inkscape 1.1-dev (efef7d6c, 2020-02-20)
- Operating System: Windows 10 home version 1903
With respect to the above problem, @nathanal has the following comments (edited by @nathanal
The css info inside the style tags aren't copied over or applied to the objects (though the objects retain their class/id). Condition: the objects that have a class are inside a group. Minimal test case
Copying the group over to a new document leaves the rect with class="pinky" but the style info isn't copied over so fill is left unset.
If you ungroup before copying over, the fill (and for some reason stroke-width, which wasn't set) is applied directly to the rectangle.
Edited by Nathan Lee