ryelle / WP-Dashboard-SVG

A demo of using an SVG sprite for the WordPress admin icons.
http://ryelle.github.io/WP-Dashboard-SVG/
21 stars 4 forks source link

IE support #2

Open ryelle opened 9 years ago

ryelle commented 9 years ago

Check out SVG for Everybody for IE 9+ support

Other options?

ryelle commented 9 years ago

This does IE6+ support, but expects a set naming convention for the png icons. From the example, if your SVG markup is

<svg role="img" title="CodePen"><use xlink:href="spritemap.svg#codepen"></use></svg>
<svg role="img" title="YouTube"><use xlink:href="spritemap.svg#youtube"></use></svg>
<svg role="img" title="Twitter"><use xlink:href="spritemap.svg#twitter"></use></svg>

It replaces the # with a ., and adds the .png:

<svg role="img" title="CodePen"><img src="spritemap.svg.codepen.png"></svg>
<svg role="img" title="YouTube"><img src="spritemap.svg.youtube.png"></svg>
<svg role="img" title="Twitter"><img src="spritemap.svg.twitter.png"></svg>

Since this embeds an <img>, I'm not sure how we can do a hover/active state.

MichaelArestad commented 9 years ago

I'm not sure a hover/active state is super feasible or necessary for fallbacks.