We use inline SVG's quite heavily in our app. Recently I discovered unwanted behaviour (especially in Firefox, but I have seen similar issues in Chrome) where styling from different svg's can interfere with each other. I tracked my current issue down to the use of 'display: none'.
To illustrate my problem, see the attached HTML below. This contains two round german flags, the first one is hidden. In chrome you will see a round german flag (which is correct). In Firefox you will see a square german flag (which is incorrect). If you remove the display: none on the first div, both flags are displayed correctly (round) or if you remove the entire first div, the second flag will display correctly (round).
Why is the display none on the first occurrence of the svg making the second occurrence display incorrectly?
I figured that I can workaround this problem by using different id's in both svg's, but since I want to include them on multiple pages from a common html file which contains the inline svg, this is quite impractical at the moment.
<html>
<body>
<div style="display: none;">
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
<defs>
<circle id="bundesliga-a" cx="-52" cy="-52" r="32"/>
</defs>
<clipPath id="bundesliga-b">
<use xlink:href="#bundesliga-a" overflow="visible"/>
</clipPath>
<g clip-path="url(#bundesliga-b)">
<path fill="#FFF"
d="M3.9 2.7S5.5.4 5-.5C4.5-1.6-8-14.2-8-14.2c.5-.9.7-1.8 1.1-2.7-1.4-1.6-1.6-3.6-.9-6.2.7-2.7 5.7-19.4-.7-31 .7-1.6 2.1-4.8 2.5-11.6 1.1-12.8-6.6-21-17.1-21-6.6 0-16.2-.5-20.1-2.3-8.5-4-10.6-14.3-6.9-17.2l.2-.2c1.1-.7 3-.2 5 .5 1.6.5 3.2.9 5 .7h.7c10.3-1.4 9.6-10.3 9.6-10.3 0 1.6-2.3 1.8-2.7 2.1-3.2.5-7.5-.7-9.8-.7-.9 0-2.7.5-3.2.7-5.7 2.1-12.5 7.3-10.5 16.2 2.1 9.3 8.4 11.8 15 12.8.5 0 .9.2 1.1.2 3.9.7 8 .9 11.8 1.6 17.1 2.5 13.9 18.2 12.3 23-3.6-1.1-11.7 5.3-15.3 5.5-2.7.1-6.7-8.9-7.4-10.6 9.1 3.2 17.3-.9 18.2-1.8 1.4-.9.2-1.1-1.8-1.1-8.2.2-10.5-5-16.9-8.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.7 1.8.5 3-.2 1.4-1.8 3.6-2.7 4.8-.7.7-1.4 1.4-1.8 2.1-.7 1.1-.5 2.5.2 3 0 0-4.1 2.5-6.4 8.9 4.8.5 10.3-.2 11.8-1.4 0 0 .7-3-.5-5.5.9 0 1.4-.2 1.8-.5 1.8-1.4 1.1-3.9 1.1-3.9.9-1.6 3.6-7.3 5.2-8.2 1.6-.9 2.7-1.6 3.4-3.6.5-1.6-.2-3-1.1-3.9l-.2-.2c-2.5-2.7.9-5.9 1.4-9.3 1.1 1.6.2 3.6 0 5.2-.2 1.8-.5 4.1 1.6 5.2.7.5 1.8.7 3.2.5 3.2 0 3.9-2.1 3.9-2.1-5.7-5.9-6.4-10.6-5.5-13.2 1.5-4.5 5.1-9.3 5.1-9.3-1.1 3.6-3.7 7-2.8 11.8.9 5 4.3 9.3 7.7 13 2.5 2.5 6.4 4.6 7.7 6.6C-1.8-1.5-3.7-2.7-2.8.5c.5 1.8 1.1 2.1 3 2.3 1.1 0 .9.7 2.7-.2C4.3 1.9 5 .8 5 .8s3.1-1.3 2.2-2z"/>
</g>
<g>
<defs>
<circle id="bundesliga-c" cx="32" cy="32" r="32"/>
</defs>
<clipPath id="bundesliga-d">
<use xlink:href="#bundesliga-c" overflow="visible"/>
</clipPath>
<circle clip-path="url(#bundesliga-d)" fill="#D12028" cx="32" cy="32" r="32"/>
<defs>
<circle id="bundesliga-e" cx="32" cy="32" r="32"/>
</defs>
<clipPath id="bundesliga-f">
<use xlink:href="#bundesliga-e" overflow="visible"/>
</clipPath>
<path clip-path="url(#bundesliga-f)" fill="#EEC258" d="M0 43.2h64V64H0z"/>
<g>
<defs>
<circle id="bundesliga-g" cx="32" cy="32" r="32"/>
</defs>
<clipPath id="bundesliga-h">
<use xlink:href="#bundesliga-g" overflow="visible"/>
</clipPath>
<path clip-path="url(#bundesliga-h)" fill="#292929" d="M0 0h64v20.8H0z"/>
</g>
<g>
<defs>
<circle id="bundesliga-i" cx="32" cy="32" r="32"/>
</defs>
<clipPath id="bundesliga-j">
<use xlink:href="#bundesliga-i" overflow="visible"/>
</clipPath>
<path opacity=".07" clip-path="url(#bundesliga-j)" fill="#292929" d="M17.6 64H0V0h40"/>
</g>
</g>
</svg>
</div>
<div>
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
<defs>
<circle id="bundesliga-a" cx="-52" cy="-52" r="32"/>
</defs>
<clipPath id="bundesliga-b">
<use xlink:href="#bundesliga-a" overflow="visible"/>
</clipPath>
<g clip-path="url(#bundesliga-b)">
<path fill="#FFF"
d="M3.9 2.7S5.5.4 5-.5C4.5-1.6-8-14.2-8-14.2c.5-.9.7-1.8 1.1-2.7-1.4-1.6-1.6-3.6-.9-6.2.7-2.7 5.7-19.4-.7-31 .7-1.6 2.1-4.8 2.5-11.6 1.1-12.8-6.6-21-17.1-21-6.6 0-16.2-.5-20.1-2.3-8.5-4-10.6-14.3-6.9-17.2l.2-.2c1.1-.7 3-.2 5 .5 1.6.5 3.2.9 5 .7h.7c10.3-1.4 9.6-10.3 9.6-10.3 0 1.6-2.3 1.8-2.7 2.1-3.2.5-7.5-.7-9.8-.7-.9 0-2.7.5-3.2.7-5.7 2.1-12.5 7.3-10.5 16.2 2.1 9.3 8.4 11.8 15 12.8.5 0 .9.2 1.1.2 3.9.7 8 .9 11.8 1.6 17.1 2.5 13.9 18.2 12.3 23-3.6-1.1-11.7 5.3-15.3 5.5-2.7.1-6.7-8.9-7.4-10.6 9.1 3.2 17.3-.9 18.2-1.8 1.4-.9.2-1.1-1.8-1.1-8.2.2-10.5-5-16.9-8.7-2.2-1.2-5.6-2.5-9.2-3.2l-5.8-6.7c-2.9-2.5-6.6-3.8-10.2-3.4-4.6.5-12.8 6.2-18.3 12.3-5.5 6.4-8.2 10-9.3 14.6-.7 2.7-.5 7.3-.5 7.3-5.7 6.8-2.3 21-2.3 21s-5.2 8.7-3 21.9c.7 4.6-.9 9.8-1.6 12.3-.2.9-.5 1.1-.9 1.4-.5.5-2.5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3.4-3.6.5-1.6-.2-3-1.1-3.9l-.2-.2c-2.5-2.7.9-5.9 1.4-9.3 1.1 1.6.2 3.6 0 5.2-.2 1.8-.5 4.1 1.6 5.2.7.5 1.8.7 3.2.5 3.2 0 3.9-2.1 3.9-2.1-5.7-5.9-6.4-10.6-5.5-13.2 1.5-4.5 5.1-9.3 5.1-9.3-1.1 3.6-3.7 7-2.8 11.8.9 5 4.3 9.3 7.7 13 2.5 2.5 6.4 4.6 7.7 6.6C-1.8-1.5-3.7-2.7-2.8.5c.5 1.8 1.1 2.1 3 2.3 1.1 0 .9.7 2.7-.2C4.3 1.9 5 .8 5 .8s3.1-1.3 2.2-2z"/>
</g>
<g>
<defs>
<circle id="bundesliga-c" cx="32" cy="32" r="32"/>
</defs>
<clipPath id="bundesliga-d">
<use xlink:href="#bundesliga-c" overflow="visible"/>
</clipPath>
<circle clip-path="url(#bundesliga-d)" fill="#D12028" cx="32" cy="32" r="32"/>
<defs>
<circle id="bundesliga-e" cx="32" cy="32" r="32"/>
</defs>
<clipPath id="bundesliga-f">
<use xlink:href="#bundesliga-e" overflow="visible"/>
</clipPath>
<path clip-path="url(#bundesliga-f)" fill="#EEC258" d="M0 43.2h64V64H0z"/>
<g>
<defs>
<circle id="bundesliga-g" cx="32" cy="32" r="32"/>
</defs>
<clipPath id="bundesliga-h">
<use xlink:href="#bundesliga-g" overflow="visible"/>
</clipPath>
<path clip-path="url(#bundesliga-h)" fill="#292929" d="M0 0h64v20.8H0z"/>
</g>
<g>
<defs>
<circle id="bundesliga-i" cx="32" cy="32" r="32"/>
</defs>
<clipPath id="bundesliga-j">
<use xlink:href="#bundesliga-i" overflow="visible"/>
</clipPath>
<path opacity=".07" clip-path="url(#bundesliga-j)" fill="#292929" d="M17.6 64H0V0h40"/>
</g>
</g>
</svg>
</div>
</body>
</html>
Ok, since posting this question I have been in touch with a few other people at my company and together we worked this out.
First the problem: When you use inline svg's AND one particular svg is included twice AND this particular svg uses id references (for instance to a defined clipPath) AND the first of the svg's (at least on firefox) is inside a html element with display:none.. THEN the id reference in the second occurrence of that svg references the clipPath in the first (hidden) svg and this results in the clipPath not being displayed, and thus the round icon becomes square.
Now my temporary solution: A lot of our icons that were causing this issue had the exact same clipPath defined multiple times. I included a 'dummy' svg at the top of our page body defining this exact clipPath:
<svg width="0" height="0" style="position: absolute;"><clipPath id="circle-32"><circle cx="32" cy="32" r="32"/></clipPath></svg>
Then I removed all the clipPath definitions from all our problematic svg's and replaced them with references to the #circle-32 clipPath.
This resulted in working svg's again :)
The long term solution: We decided that our designer needs to spend more time on creating/exporting proper svg's that do not use this many clipPath references (or other references for that matter) and in the future we will replace our entire svg set with redrawn images that are properly exported for web use and minimize these constructions.
I was recommended to forward this blogpost with tips on how to create proper svg's to our designer: https://sarasoueidan.com/blog/svg-tips-for-designers/