This repo contains various test cases related to displaying icons.
The icons used for the test come from Icomoon's free icon set. This icon set includes 491 icons. I've decided to use Icomoon's free set as they offer an svg sprite of the icons along with font icons.
Contributions welcome, feel free to open an issue with your ideas.
- Inline svg sprite at top of body
- SVG use xlink:href point to symbols in the svg sprite
- Inline script at end of the body to ajax load inline svg sprite at top of body
- SVG use xlink:href point to symbols in the svg sprite
- Inline script at end of the body to ajax load inline svg sprite at top of body
- SVG use xlink:href point to symbols in the svg sprite
- Noscript element with the SVG sprite markup inside of it (handles no-js case)
- SVG use xlink:href point to symbols in the svg sprite
- SVG sprite loaded in object element at top of body
- Inline script at end of the body to replace the object with the SVG sprite
- SVG use xlink:href point to symbols in the svg sprite
- External use xlink:href
- SVG use xlink:href point to symbols in the svg sprite
- Inline script in the head to ajax load inline svg sprite at top of body
- SVG use xlink:href point to symbols in the svg sprite
- Noscript element with the SVG sprite markup inside of it (handles no-js case)
- SVG use xlink:href point to symbols in the svg sprite (Same as test 3, though inline script has been moved to the head)
- Inline script in the head to add a script tag to ajax the sprite into the head
- SVG use xlink:href point to symbols in the svg sprite
- Noscript element with the SVG sprite markup inside of it (handles no-js case)
- SVG use xlink:href point to symbols in the svg sprite (Same as test 7, though inline JS adds a script tag to load in the ajax JS rather than include the ajax in the inline script block)
- Inline every SVG
- External use svg sprite
- SVG4Everybody.js polyfill
- External use svg sprite
- svgxuse.js polyfill
- Same as test 1
- SVG files have been run through SVGO, then grunt-svgstore to create sprite
- HTML file has been minified
- Same as test 2
- SVG files have been run through SVGO, then grunt-svgstore to create sprite
- HTML file has been minified
- Same as test 3
- SVG files have been run through SVGO, then grunt-svgstore to create sprite
- HTML file has been minified
- Same as test 4
- SVG files have been run through SVGO, then grunt-svgstore to create sprite
- HTML file has been minified
- Same as test 5
- SVG files have been run through SVGO, then grunt-svgstore to create sprite
- HTML file has been minified
- Same as test 6
- SVG files have been run through SVGO, then grunt-svgstore to create sprite
- HTML file has been minified
- Same as test 7
- SVG files have been run through SVGO, then grunt-svgstore to create sprite
- HTML file has been minified
- Same as test 8
- SVG files have been run through SVGO, then inlined into page
- HTML file has been minified
- Same as test 9
- SVG files have been run through SVGO, then grunt-svgstore to create sprite
- HTML file has been minified
- Same as test 10
- SVG files have been run through SVGO, then grunt-svgstore to create sprite
- HTML file has been minified
====
This test includes a loading the icons via webfont. The test CSS includes reference to ttf and woff fonts.
- Same as test 1
- HTML file has been minified
- CSS file has been minified