2

This question has a really interesting problem at the core:

Setting display: none on the SVG containing the SVG sprites (symbols) will make the clip paths that are defined and referenced within unusable, while hiding the SVG using height: 0; width: 0; will make them work.

While the question has an answer to fix the immediate problem, it does not answer why this works. I am guessing it has something to do with the Shadow DOM: it seems as the ids in the defs section are unreferable when display: none is set on the container. Could anyone shed some light on the hows and whys in this, preferably with some reference to the SVG or HTML specs?

Community
  • 1
  • 1
oligofren
  • 20,744
  • 16
  • 93
  • 180

0 Answers0