Invisible SVG elements are always rendered. Both style properties, display:none and visibility:hidden, do not work!
Example:
The second and third rectangle should not be visible!
Example:
<svg xmlns="http://www.w3.org/2000/svg"
width="5in" height="3in" viewBox="0 0 500 300">
<g style="stroke:#000000;stroke-width:2">
<rect x="0" y="0" width="500" height="300" style="fill:#555555;"/>
<rect x="120" y="100" width="80" height="50" style="fill:#fff;visibility:hidden"/>
<rect x="220" y="100" width="80" height="50" style="fill:#aaaaaa;display:none"/>
</g>
</svg>
The second and third rectangle should not be visible!
- - -
Johann