{"id":246,"date":"2015-08-06T13:39:47","date_gmt":"2015-08-06T13:39:47","guid":{"rendered":"https:\/\/futuramo.com\/blog-test\/?p=246"},"modified":"2018-03-22T16:34:51","modified_gmt":"2018-03-22T15:34:51","slug":"futuramo-icons-svg-sprites","status":"publish","type":"post","link":"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/","title":{"rendered":"SVG sprites"},"content":{"rendered":"<p>An SVG sprite is, simply speaking, a container for all the SVG icons that you are using in your website project, which allows inline referencing of single icons within &lt;use&gt; tags.<\/p>\n<p>Despite being slightly less supported than webfont icons, SVG sprites are the modern method of choice for embedding icons when compatibility \u201cup to two previous versions\u201d is deemed enough.<\/p>\n<h2 id=\"downloading-futuramo-svg-sprites\" class=\"post-component text\"><strong>Downloading Futuramo SVG sprites<\/strong><\/h2>\n<p class=\"post-component text\">To download an icon SVG sprite, proceed just like with <a href=\"https:\/\/futuramo.com\/blog\/futuramo-icons-webfonts-true-type-ttf-woff2-eot\/\" target=\"_blank\" rel=\"noopener\">downloading a webfont pack,<\/a> but choosing \u201cSVG sprite\u201d in the download dialog instead. You don\u2019t need to name the sprite (technically, it is just a collection of icons, as opposed to a font-face), but you can name the archive that you download for your convenience.<\/p>\n<figure class=\"post-component picture\"><img loading=\"lazy\" class=\"alignnone wp-image-248 size-full\" src=\"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-icons-svg-sprites-download-modal.png\" alt=\"svg sprites download\" width=\"633\" height=\"441\" \/><\/figure>\n<p class=\"post-component text\">The .zip archive that you download contains a demonstration of SVG sprite usage.<\/p>\n<figure class=\"post-component picture\"><img loading=\"lazy\" class=\"alignnone wp-image-250 size-full\" src=\"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-icons-sprite.png\" alt=\"svg sprites xhref\" width=\"630\" height=\"87\" \/><\/figure>\n<p class=\"post-component text\">Each icon is subscribed with the automatically generated xhref reference that is used within the &lt;use&gt; tag.<\/p>\n<figure class=\"post-component picture\"><img loading=\"lazy\" class=\"alignnone wp-image-251 size-full\" src=\"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-svg-sprite.png\" alt=\"svg sprites code 2\" width=\"628\" height=\"653\" srcset=\"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-svg-sprite.png 628w, https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-svg-sprite-32x32.png 32w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><\/figure>\n<h2 id=\"example-of-use\" class=\"post-component text\"><strong>Example of use<\/strong><\/h2>\n<p class=\"post-component text\">Here you can see the code:<\/p>\n<figure class=\"post-component picture\"><img loading=\"lazy\" class=\"alignnone wp-image-252 size-medium\" src=\"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-svg-sprites-code-483x1024.png\" alt=\"svg sprites code\" width=\"377\" height=\"800\" srcset=\"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-svg-sprites-code-483x1024.png 483w, https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-svg-sprites-code.png 630w\" sizes=\"(max-width: 377px) 100vw, 377px\" \/><\/figure>\n<p class=\"post-component text\">&#8230;and the visual result:<\/p>\n<figure class=\"post-component picture\"><img loading=\"lazy\" class=\"alignnone wp-image-253 size-full\" src=\"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-icons-svg-sprites-example.png\" alt=\"svg sprites fruit example\" width=\"630\" height=\"233\" \/><\/figure>\n<h2 id=\"why-use-svg-sprites-for-icons\" class=\"post-component text\"><strong>Why use SVG sprites for icons?<\/strong><\/h2>\n<div class=\"post-component text\">\n<ol>\n<li>Good browser support (all modern browsers, legacy browsers up to IE 8)<\/li>\n<li>Good support of css styling<\/li>\n<li>Inlined in the document \u2013 no need for separate requests<\/li>\n<li>Straightforward referencing and positioning, quick and reliable rendering in most browsers<\/li>\n<li>Good semantics \u2013 an &lt;svg&gt; tag already depicts an image resource<\/li>\n<\/ol>\n<\/div>\n","protected":false},"excerpt":{"rendered":"An SVG sprite is, simply speaking, a container for all the SVG icons that you are using in&hellip;\n","protected":false},"author":2,"featured_media":254,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","csco_post_video_location":[],"csco_post_video_url":"","csco_post_video_bg_start_time":0,"csco_post_video_bg_end_time":0},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SVG sprites for icons | Futuramo Blog<\/title>\n<meta name=\"description\" content=\"SVG sprites are containers for all the SVG icons that you use in your website project, which allows to inline referencing of single icons within use tags\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SVG sprites for icons | Futuramo Blog\" \/>\n<meta property=\"og:description\" content=\"SVG sprite is a container for all the SVG icons that you use in your website project, which allows to inline referencing of single icons within use tags\" \/>\n<meta property=\"og:url\" content=\"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/\" \/>\n<meta property=\"og:site_name\" content=\"Helping teams work better \u2014 insights on productivity, collaboration, marketing, and the tools that make it happen | Futuramo Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-08-06T13:39:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-22T15:34:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-icons-svg-sprites.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"648\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:title\" content=\"SVG sprites for icons | Futuramo Blog\" \/>\n<meta name=\"twitter:description\" content=\"SVG sprite is a container for all the SVG icons that you use in your website project, which allows to inline referencing of single icons within use tags\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Futuramo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/futuramo.com\/blog\/#website\",\"url\":\"https:\/\/futuramo.com\/blog\/\",\"name\":\"Helping teams work better \u2014 insights on productivity, collaboration, marketing, and the tools that make it happen | Futuramo Blog\",\"description\":\"Exploring Innovation, Effectiveness, and Creativity Across Industries \",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/futuramo.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/#primaryimage\",\"url\":\"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-icons-svg-sprites.jpg\",\"contentUrl\":\"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-icons-svg-sprites.jpg\",\"width\":1920,\"height\":648,\"caption\":\"svg sprites\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/#webpage\",\"url\":\"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/\",\"name\":\"SVG sprites for icons | Futuramo Blog\",\"isPartOf\":{\"@id\":\"https:\/\/futuramo.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/#primaryimage\"},\"datePublished\":\"2015-08-06T13:39:47+00:00\",\"dateModified\":\"2018-03-22T15:34:51+00:00\",\"author\":{\"@id\":\"https:\/\/futuramo.com\/blog\/#\/schema\/person\/98b5eca5abfaece04786f8a04ec93902\"},\"description\":\"SVG sprites are containers for all the SVG icons that you use in your website project, which allows to inline referencing of single icons within use tags\",\"breadcrumb\":{\"@id\":\"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/futuramo.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SVG sprites\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/futuramo.com\/blog\/#\/schema\/person\/98b5eca5abfaece04786f8a04ec93902\",\"name\":\"Futuramo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/futuramo.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2021\/11\/Futuramo_avatar-96x96.png\",\"contentUrl\":\"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2021\/11\/Futuramo_avatar-96x96.png\",\"caption\":\"Futuramo\"},\"url\":\"https:\/\/futuramo.com\/blog\/author\/adminek\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SVG sprites for icons | Futuramo Blog","description":"SVG sprites are containers for all the SVG icons that you use in your website project, which allows to inline referencing of single icons within use tags","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"SVG sprites for icons | Futuramo Blog","og_description":"SVG sprite is a container for all the SVG icons that you use in your website project, which allows to inline referencing of single icons within use tags","og_url":"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/","og_site_name":"Helping teams work better \u2014 insights on productivity, collaboration, marketing, and the tools that make it happen | Futuramo Blog","article_published_time":"2015-08-06T13:39:47+00:00","article_modified_time":"2018-03-22T15:34:51+00:00","og_image":[{"width":1920,"height":648,"url":"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-icons-svg-sprites.jpg","type":"image\/jpeg"}],"twitter_card":"summary","twitter_title":"SVG sprites for icons | Futuramo Blog","twitter_description":"SVG sprite is a container for all the SVG icons that you use in your website project, which allows to inline referencing of single icons within use tags","twitter_misc":{"Written by":"Futuramo","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/futuramo.com\/blog\/#website","url":"https:\/\/futuramo.com\/blog\/","name":"Helping teams work better \u2014 insights on productivity, collaboration, marketing, and the tools that make it happen | Futuramo Blog","description":"Exploring Innovation, Effectiveness, and Creativity Across Industries ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/futuramo.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/#primaryimage","url":"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-icons-svg-sprites.jpg","contentUrl":"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2015\/08\/futuramo-icons-svg-sprites.jpg","width":1920,"height":648,"caption":"svg sprites"},{"@type":"WebPage","@id":"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/#webpage","url":"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/","name":"SVG sprites for icons | Futuramo Blog","isPartOf":{"@id":"https:\/\/futuramo.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/#primaryimage"},"datePublished":"2015-08-06T13:39:47+00:00","dateModified":"2018-03-22T15:34:51+00:00","author":{"@id":"https:\/\/futuramo.com\/blog\/#\/schema\/person\/98b5eca5abfaece04786f8a04ec93902"},"description":"SVG sprites are containers for all the SVG icons that you use in your website project, which allows to inline referencing of single icons within use tags","breadcrumb":{"@id":"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/futuramo.com\/blog\/futuramo-icons-svg-sprites\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/futuramo.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SVG sprites"}]},{"@type":"Person","@id":"https:\/\/futuramo.com\/blog\/#\/schema\/person\/98b5eca5abfaece04786f8a04ec93902","name":"Futuramo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/futuramo.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2021\/11\/Futuramo_avatar-96x96.png","contentUrl":"https:\/\/futuramo.com\/blog\/wp-content\/uploads\/2021\/11\/Futuramo_avatar-96x96.png","caption":"Futuramo"},"url":"https:\/\/futuramo.com\/blog\/author\/adminek\/"}]}},"_links":{"self":[{"href":"https:\/\/futuramo.com\/blog\/wp-json\/wp\/v2\/posts\/246"}],"collection":[{"href":"https:\/\/futuramo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/futuramo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/futuramo.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/futuramo.com\/blog\/wp-json\/wp\/v2\/comments?post=246"}],"version-history":[{"count":8,"href":"https:\/\/futuramo.com\/blog\/wp-json\/wp\/v2\/posts\/246\/revisions"}],"predecessor-version":[{"id":1504,"href":"https:\/\/futuramo.com\/blog\/wp-json\/wp\/v2\/posts\/246\/revisions\/1504"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/futuramo.com\/blog\/wp-json\/wp\/v2\/media\/254"}],"wp:attachment":[{"href":"https:\/\/futuramo.com\/blog\/wp-json\/wp\/v2\/media?parent=246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/futuramo.com\/blog\/wp-json\/wp\/v2\/categories?post=246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/futuramo.com\/blog\/wp-json\/wp\/v2\/tags?post=246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}