Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Swapping Out SVG Icons – Problems with Mobile Safari Reply To: Swapping Out SVG Icons – Problems with Mobile Safari

#190640
launchoverit
Participant

Dug into this a bit more, and it really does look like if the SVG has display:none when the page loads, mobile webkit browsers don’t actually load it and won’t load it if you try to show it later. So much so that the only consistent way I’ve found of accomplishing this is to hide it with JS after a delay* – http://codepen.io/meanspa/pen/vEGKVO

This seems like a pretty big problem for loading SVG’s with the <use> tag?

*Sadly, the only way I know of to see this in action is to download this codepen, move the SVG’s to an exteranal file, serve it on your local network and view it on an iOS device :(