Is it possible to hide SVG elements? I’ve tried creating a visible key with value false and hidden, as well as a visibility key with values hidden and false with no success.
As a workaround, I’ve found that changing the type to anything but path will effectively hide it…
The problem is probably that attributes have a lower priority than CSS.
So the order of priority is:
SVG attributes
Global CSS styles
Inline CSS styles
In particular, if the global CSS style even defines something like visibility:inherit, which seems like a nice default for all elements, you can no longer set the visibility key on the SVG.
The only decent workaround seems to use inline styles: style="visibility:hidden"
It works for the whole SVG, but not for the elements of the SVG.
I found a dodgy workaround where setting the type to something else, e.g. 'group', will 'hide' it.