Perspective: Hide SVG elements


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"

Out of topic, sorry, but how did you get sag inside Perspective… it seems that since 8.1.x, drag and drop sag is not working ;(

visibiltiy: hidden does work you just have to put it inside the style property

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.

it actually does work for elements too
you just need to add a style object to each of the elements and add the visibility to the style object