{"id":64629,"date":"2019-05-04T04:19:56","date_gmt":"2019-05-04T11:19:56","guid":{"rendered":"http:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/"},"modified":"2019-05-04T04:19:56","modified_gmt":"2019-05-04T11:19:56","slug":"a-practical-guide-to-svg-and-design-tools","status":"publish","type":"post","link":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/","title":{"rendered":"A Practical Guide To SVG And Design Tools"},"content":{"rendered":"<link rel=\"canonical\" href=\"https:\/\/www.smashingmagazine.com\/2019\/05\/svg-design-tools-practical-guide\/\"><title>A Practical Guide To SVG And Design Tools<\/title><\/p>\n<article>\n<header>\n<h1>A Practical Guide To SVG And Design Tools<\/h1>\n<address>Miko?aj Dobrucki<\/address>\n<p>                  <time datetime=\"2019-05-03T14:00:59+02:00\">2019-05-03T14:00:59+02:00<\/time><time datetime=\"2019-05-04T11:04:19+00:00\">2019-05-04T11:04:19+00:00<\/time><\/header>\n<p>A good understanding of SVG is a rare skill. Surprisingly often, SVG is treated as just another image format. We use SVG because of its scalability and smaller file size, but in reality, SVG is so much more!<\/p>\n<p>In this article, I\u2019ll shed light on three of the most popular design tools: Adobe Illustrator, Sketch, and Figma. There are also other tools available supporting SVG that may have other functionalities and implement other solutions.<\/p>\n<p><strong>Note<\/strong>: <em>If not stated otherwise, the content of this article is referring to <a href=\"https:\/\/www.w3.org\/TR\/2011\/REC-SVG11-20110816\/\">SVG 1.1 2nd Edition<\/a>. Some of the points discussed below would not apply to <a href=\"https:\/\/www.w3.org\/TR\/SVG2\/\">SVG 2<\/a>, however, it still hasn\u2019t reached the recommendation status, leaving SVG 1.1 as the most up-to-date specification.<\/em><\/p>\n<h3>Why Bother About Design Tools?<\/h3>\n<p>SVG is an <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/XML\">XML<\/a>-based markup language and, like any other programming language, can be written and edited in a text editor. So theoretically, as opposed to JPG or PNG files, we don\u2019t need any GUI software to create SVG. However, in a vast majority of cases, using graphic design applications is inevitable.<\/p>\n<p>Working with complicated shapes and graphics in a text-based format is utterly possible, but usually would be very tricky and tedious. Therefore, it\u2019s common practice to use applications such as Adobe Illustrator, Sketch or Figma to design graphics visually, and then export them to an SVG format.<\/p>\n<p>So no matter if you\u2019re a designer that codes or a design-conscious developer, a good proficiency in working with SVG requires a bit of knowledge from both sides: design tools and the SVG language itself. To better understand the relation between the two, let\u2019s take a closer look at what graphic design apps have to offer and how their features translate to SVG.<\/p>\n<div data-component=\"FeaturePanel\" data-audience=\"non-subscriber\" data-remove=\"true\"><\/div>\n<h3>Basic Shapes<\/h3>\n<p>Many vector graphics are build out of a few basic shapes \u2014 grouped, transformed and combined with each other. The table below represents what shape tools are available in Illustrator, Sketch, and Figma and what SVG elements they are exported as.<\/p>\n<table>\n<thead>\n<tr>\n<th>Illustrator<\/th>\n<th>Sketch<\/th>\n<th>Figma<\/th>\n<th>Generated SVG<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Ellipse Tool<\/td>\n<td>Oval<\/td>\n<td>Ellipse<\/td>\n<td><code><circle \/><\/code> or <code><ellipse \/><\/code><\/td>\n<\/tr>\n<tr>\n<td>Rectangle Tool<\/td>\n<td>Rectangle<\/td>\n<td>Rectangle<\/td>\n<td><code><rect \/><\/code><\/td>\n<\/tr>\n<tr>\n<td>Rounded Rectangle Tool<\/td>\n<td>Rounded<\/td>\n<td>&#8211;<\/td>\n<td><code><rect rx=\"\u2026\" \/><\/code><\/td>\n<\/tr>\n<tr>\n<td>Line Segment Tool<\/td>\n<td>Line<\/td>\n<td>Line<\/td>\n<td><code><line \/><\/code> (Illustrator and Figma) <code><path \/><\/code> (Sketch)<\/td>\n<\/tr>\n<tr>\n<td>&#8211;<\/td>\n<td>Arrow<\/td>\n<td>Arrow<\/td>\n<td><code><path \/><\/code><\/td>\n<\/tr>\n<tr>\n<td>Polygon Tool<\/td>\n<td>Polygon<\/td>\n<td>Polygon<\/td>\n<td><code><polygon \/><\/code> (Illustrator and Sketch) <code><path \/><\/code> (Figma)<\/td>\n<\/tr>\n<tr>\n<td>Star Tool<\/td>\n<td>Star<\/td>\n<td>Star<\/td>\n<td><code><polygon \/><\/code> (Illustrator and Sketch) <code><path \/><\/code> (Figma)<\/td>\n<\/tr>\n<tr>\n<td>&#8211;<\/td>\n<td>Triangle<\/td>\n<td>&#8211;<\/td>\n<td><code><polygon \/><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Ellipses And Circles<\/h4>\n<p>One of the basic shapes in every design tool is an ellipse. In SVG, we will find a matching <code><ellipse \/><\/code> element, defined by the coordinates of the ellipse\u2019s centre (<code>cx<\/code> and <code>cy<\/code>) and two radii (<code>rx<\/code> and <code>ry<\/code>).<\/p>\n<p>This is what an ellipse looks like in SVG:<\/p>\n<pre><code><ellipse cx=\"400\" cy=\"300\" rx=\"250\" ry=\"150\"\/><\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/33ecc52f-f367-4aea-ae7e-bc2add97f7a0\/ellipse.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/ellipse.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/33ecc52f-f367-4aea-ae7e-bc2add97f7a0\/ellipse.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/33ecc52f-f367-4aea-ae7e-bc2add97f7a0\/ellipse.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/33ecc52f-f367-4aea-ae7e-bc2add97f7a0\/ellipse.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/33ecc52f-f367-4aea-ae7e-bc2add97f7a0\/ellipse.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/ellipse.png?w=900\" sizes=\"100vw\" alt=\"SVG ellipse\"><\/a><figcaption>\n      SVG ellipse (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/33ecc52f-f367-4aea-ae7e-bc2add97f7a0\/ellipse.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>The very special type of ellipse is a circle. A circle is an ellipse with <code>rx<\/code> and <code>ry<\/code> radii equal to each other. SVG has its own <code><circle \/><\/code> element that takes one attribute less as there\u2019s only one radius to be taken into account:<\/p>\n<pre><code><circle cx=\"400\" cy=\"300\" r=\"250\"\/><\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7d625ec0-fb0f-44a4-a3c6-e46d75d34f48\/circle.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/circle.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7d625ec0-fb0f-44a4-a3c6-e46d75d34f48\/circle.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7d625ec0-fb0f-44a4-a3c6-e46d75d34f48\/circle.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7d625ec0-fb0f-44a4-a3c6-e46d75d34f48\/circle.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7d625ec0-fb0f-44a4-a3c6-e46d75d34f48\/circle.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/circle.png?w=900\" sizes=\"100vw\" alt=\"SVG circle\"><\/a><figcaption>\n      SVG circle (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/7d625ec0-fb0f-44a4-a3c6-e46d75d34f48\/circle.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>In case of ellipses and circles, all design tools work the same: <em>Ellipse Tool<\/em> in Illustrator, <em>Oval<\/em> tool in Sketch and <em>Ellipse<\/em> tool in Figma will all generate <code><ellipse \/><\/code> element unless the radii are equal: in such cases we will end up with a <code><circle \/><\/code> element.<\/p>\n<h4>Rectangles And Rounded Rectangles<\/h4>\n<p>Another basic shape common to all design tools is a rectangle. In case of all design tools, using a rectangle tool generates a <code><rect \/><\/code> element in SVG. A basic <code><rect \/><\/code> is defined by 4 attributes: its <code>x<\/code> and <code>y<\/code> coordinates, along with its width and height:<\/p>\n<pre><code><rect x=\"150\" y=\"100\" width=\"500\" height=\"400\"\/><\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e1ab700c-646c-46f9-88cf-cc324f9bac91\/rectangle.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/rectangle.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e1ab700c-646c-46f9-88cf-cc324f9bac91\/rectangle.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e1ab700c-646c-46f9-88cf-cc324f9bac91\/rectangle.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e1ab700c-646c-46f9-88cf-cc324f9bac91\/rectangle.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e1ab700c-646c-46f9-88cf-cc324f9bac91\/rectangle.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/rectangle.png?w=900\" sizes=\"100vw\" alt=\"SVG rectangle\"><\/a><figcaption>\n      SVG rectangle (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e1ab700c-646c-46f9-88cf-cc324f9bac91\/rectangle.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>Notice that while <code><ellipse \/><\/code>\u2019s and <code><circle \/><\/code>\u2019s position is defined by their geometrical centers, the position of a <code><rect \/><\/code> is defined by the coordinates of its top left corner.<\/p>\n<p>Apart from basic rectangles, we often use rectangles with rounded corners. In all three design tools, you can turn a rectangle into a rounded rectangle by applying a border radius to it in the <em>Inspector<\/em> or the <em>Properties<\/em> panel.<\/p>\n<div><\/div>\n<p>Additionally, in Sketch and Illustrator, there are tools dedicated to creating rounded rectangles (<em>Rounded Rectangle Tool<\/em> in Illustrator and <em>Rounded<\/em> tool in Sketch). However, there\u2019s no difference between a regular rectangle with a radius applied and a rounded rectangle drawn with a <em>Rounded Rectangle<\/em> tool.<\/p>\n<p>Therefore, no matter how created, a rounded rectangle will be exported using the following syntax:<\/p>\n<pre><code><rect x=\"150\" y=\"100\" width=\"500\" height=\"400\" rx=\"30\"\/><\/code><\/pre>\n<p>In this case, <code>rx<\/code> is an attribute responsible for the radius of the rounded corners:<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/56ce6b49-c90c-45a3-be0b-cfa8bc2e64b5\/rounded-rectangle.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/rounded-rectangle.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/56ce6b49-c90c-45a3-be0b-cfa8bc2e64b5\/rounded-rectangle.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/56ce6b49-c90c-45a3-be0b-cfa8bc2e64b5\/rounded-rectangle.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/56ce6b49-c90c-45a3-be0b-cfa8bc2e64b5\/rounded-rectangle.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/56ce6b49-c90c-45a3-be0b-cfa8bc2e64b5\/rounded-rectangle.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/rounded-rectangle.png?w=900\" sizes=\"100vw\" alt=\"SVG rounded rectangle\"><\/a><figcaption>\n      SVG rounded rectangle (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/56ce6b49-c90c-45a3-be0b-cfa8bc2e64b5\/rounded-rectangle.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<h5>Rounded Rectangles With Elliptical Corners<\/h5>\n<p>One significant difference between design tools and SVG is how radii are defined. In all the design tools we consider, border radius is defined by a single variable. We can think of border radii as little circles used to mask the corners of our rectangles:<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e6fb1108-1c24-4d3e-93ad-7a0af4a7271f\/rounded-corner.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/rounded-corner.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e6fb1108-1c24-4d3e-93ad-7a0af4a7271f\/rounded-corner.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e6fb1108-1c24-4d3e-93ad-7a0af4a7271f\/rounded-corner.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e6fb1108-1c24-4d3e-93ad-7a0af4a7271f\/rounded-corner.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e6fb1108-1c24-4d3e-93ad-7a0af4a7271f\/rounded-corner.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/rounded-corner.png?w=900\" sizes=\"100vw\" alt=\"Rounded corner in SVG\"><\/a><figcaption>\n      Rounded corner in SVG (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e6fb1108-1c24-4d3e-93ad-7a0af4a7271f\/rounded-corner.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>Meanwhile, in SVG border radii can be defined by two attributes: <code>rx<\/code> (as in the example above) and <code>ry<\/code>. They allow us to create rectangles with elliptical corners. You can think of such rounded corners as ellipses used as masks instead of circles:<\/p>\n<pre><code><rect x=\"150\" y=\"100\" width=\"500\" height=\"400\" rx=\"40\" ry=\"30\"\/><\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/eb7fb547-6aa3-41e5-9d59-e4314927cccd\/elliptical-corner.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/elliptical-corner.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/eb7fb547-6aa3-41e5-9d59-e4314927cccd\/elliptical-corner.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/eb7fb547-6aa3-41e5-9d59-e4314927cccd\/elliptical-corner.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/eb7fb547-6aa3-41e5-9d59-e4314927cccd\/elliptical-corner.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/eb7fb547-6aa3-41e5-9d59-e4314927cccd\/elliptical-corner.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/elliptical-corner.png?w=900\" sizes=\"100vw\" alt=\"Elliptical corner in SVG\"><\/a><figcaption>\n      Elliptical corner in SVG (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/eb7fb547-6aa3-41e5-9d59-e4314927cccd\/elliptical-corner.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>So, in this case, SVG offers you more possibilities than design tools.<\/p>\n<p><strong>Note<\/strong>: <em>Even though it\u2019s not exactly related to the topic of this article, it\u2019s worth noting that the difference described above applies to both SVG and HTML\/CSS. The CSS property<\/em>  <code>border-radius<\/code> <em>that is used to style nodes such as divs and spans also allows creating elliptical corners. You can see an example below.<\/em><\/p>\n<pre><code>border-radius: 10px 5% \/ 20px 25em 30px 35em;<\/code><\/pre>\n<p><em>Values before the slash (<code>\/<\/code>) are horizontal radii (equivalent of <code>rx<\/code>) and values after the slash are vertical values (equivalent of <code>ry<\/code>).<\/em><\/p>\n<h5>Rounded Rectangles With Multiple Radii<\/h5>\n<p>In design tools, the same as in CSS, each of the corners of a rectangle can be controlled separately. In other words, each corner can have its own radius (or no radius altogether). Such operation is not possible on a <code><rect \/><\/code> element in SVG. Each <code><rect \/><\/code> element has only one <code>rx<\/code> and one <code>ry<\/code> attribute. If you create a rectangle with multiple radii applied to its corners, the design tool will generate a <code><path \/><\/code> element instead of a <code><rect \/><\/code> element. We will talk more of a <code><path \/><\/code> element in the next section.<\/p>\n<h5>Smooth Corners<\/h5>\n<p>One of the interesting features introduced by Sketch and Figma not that long ago is smooth corners. In short, smooth corners use an irregular border-radius to achieve a result that looks more natural and, well, smooth. The most common application of smooth corners is app icons and other rounded elements on iOS. Apple used \u201cregular\u201d rounded corners on its mobile platform until iOS6 and then switched to what we call today \u201csmooth\u201d corners as a part of the big redesign introduced in 2013 (iOS7).<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/ece66085-589d-4ec4-9d15-6b0b82033819\/smooth-corners.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/smooth-corners.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/ece66085-589d-4ec4-9d15-6b0b82033819\/smooth-corners.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/ece66085-589d-4ec4-9d15-6b0b82033819\/smooth-corners.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/ece66085-589d-4ec4-9d15-6b0b82033819\/smooth-corners.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/ece66085-589d-4ec4-9d15-6b0b82033819\/smooth-corners.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/smooth-corners.png?w=900\" sizes=\"100vw\" alt=\"Difference between rounded and smooth corners\"><\/a><figcaption>\n      Difference between rounded and smooth corners (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/ece66085-589d-4ec4-9d15-6b0b82033819\/smooth-corners.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>In Sketch, you can achieve smooth corners effect by switching between <em>Round Corners<\/em> and <em>Smooth Corners<\/em> in <em>Inspector<\/em>. Figma is giving you even more control over your corners as you can manipulate with the level of smoothness in the <em>Corner Smoothing<\/em> menu.<\/p>\n<p>Unfortunately, none of these can be easily translated to SVG as SVG doesn\u2019t know the concept of smooth corners at all. There\u2019s also an important difference between what Sketch and Figma do if you try to export a rectangle with smooth corners to SVG.<\/p>\n<p>Figma ignores the smooth corners, and exports a rectangle as a regular <code><rect \/><\/code> element with rounded corners. Sketch, on the other hand, exports a rectangle with smooth corners as a <code><path \/><\/code> that is trying to replicate the true shape of smooth corners. So Figma gives us worse accuracy for the sake of keeping a rectangle a rectangle, while Sketch is aiming at maximum possible accuracy at the cost of semantics and bigger file size. If you\u2019d like to understand better what does this difference mean, we will dig deeper into the pros and cons of preserving basic shapes a bit later.<\/p>\n<div><\/div>\n<h4>Lines<\/h4>\n<p>The next basic type of element is a line. In this case, we refer to a line as a single straight line going from point A to point B.<br \/>\nIllustrator, Sketch and Figma all offer their own line tools dedicated to drawing lines.<br \/>\nIn SVG, we have a <code><line \/><\/code> element. Four of its attributes are required: the coordinates of its starting point and the coordinates of its end point:<\/p>\n<pre><code><line x1=\"100\" y1=\"100\" x2=\"200\" y2=\"200\"\/><\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/c1a20727-8124-42c1-afba-f88c46b65d50\/line.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/line.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/c1a20727-8124-42c1-afba-f88c46b65d50\/line.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/c1a20727-8124-42c1-afba-f88c46b65d50\/line.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/c1a20727-8124-42c1-afba-f88c46b65d50\/line.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/c1a20727-8124-42c1-afba-f88c46b65d50\/line.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/line.png?w=900\" sizes=\"100vw\" alt=\"SVG line\"><\/a><figcaption>\n      SVG line (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/c1a20727-8124-42c1-afba-f88c46b65d50\/line.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>When it comes to exporting, Illustrator and Figma will export lines as <code><line \/><\/code> elements where possible, while Sketch will always compute lines to  <code><path \/><\/code> elements.<\/p>\n<h4>Polylines<\/h4>\n<p>Now let\u2019s take a look at polylines. Polyline is a connected series of straight lines. Polylines don\u2019t have dedicated tools in the design tools. They can be drawn with a <em>Pen<\/em> tool (in Illustrator and Figma) or with a <em>Vector<\/em> tool (in Sketch).<\/p>\n<p>In, SVG, polylines are defined with a  <code><polyline \/><\/code> element. <code><polyline \/><\/code> is drawn using a <code>points<\/code> attribute which is a list of coordinates defining all the points that create a polyline. Let\u2019s take a look at an example of a polyline made out of three segments and four points:<\/p>\n<pre><code><polyline points=\"10,20 10,20 30,10 40,20\" \/><\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/cee72efa-5e41-4d84-a660-bc101b080472\/polyline.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/polyline.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/cee72efa-5e41-4d84-a660-bc101b080472\/polyline.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/cee72efa-5e41-4d84-a660-bc101b080472\/polyline.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/cee72efa-5e41-4d84-a660-bc101b080472\/polyline.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/cee72efa-5e41-4d84-a660-bc101b080472\/polyline.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/polyline.png?w=900\" sizes=\"100vw\" alt=\"polyline\"><\/a><figcaption>\n      (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/cee72efa-5e41-4d84-a660-bc101b080472\/polyline.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>Illustrator and Sketch translate polylines to <code><polyline\/><\/code> elements, whilst Figma exports polylines as <code><path \/><\/code>s.<\/p>\n<h4>Arrows<\/h4>\n<p>In all three tools, you can control the ends of the lines to turn them into arrows and such. And all three tools will export such lines as <code><path \/><\/code>s, even if without the caps applied the same shapes would be translated to <code><line \/><\/code>s or <code><polyline \/><\/code>s. Is it because SVG doesn\u2019t support arrows? Not exactly.<\/p>\n<p>Actually, SVG specification <em>does<\/em> include customizable line ends which are known as markers. However, none of the design tools we mentioned use markers in the SVG they generate.<\/p>\n<p><code><marker><\/code> is a separate SVG element that can be defined within SVG\u2019s <code><defs><\/code> and then used on  <code><line><\/code>, <code><polyline><\/code> and <code><path><\/code> elements with marker attributes: <code>marker<\/code>, <code>marker-start<\/code>, <code>marker-mid<\/code> and <code>marker-end<\/code>. If you\u2019d like to learn more about these attributes, I would recommend you to check out <a href=\"https:\/\/www.w3.org\/TR\/2011\/REC-SVG11-20110816\/painting.html#Markers\">the official W3C documentation<\/a>.<\/p>\n<h4>Polygons And Stars<\/h4>\n<p>The last basic shape we\u2019ll take a look at it is a polygon. Polygon is a closed shape made of straight lines, e.g. star or a hexagon. You can also think of it as of a closed polyline. The syntax of a <code><polygon \/><\/code> element in SVG is actually the same as of a <code><polyline \/><\/code>. The only difference between the two is that in the <code><polygon \/><\/code> the last point on the list is always being connected with the first point to make a <code><polygon \/><\/code> a closed shape.<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/62f2b220-4640-4c35-98be-42ccd9ea0c15\/polygon.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/polygon.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/62f2b220-4640-4c35-98be-42ccd9ea0c15\/polygon.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/62f2b220-4640-4c35-98be-42ccd9ea0c15\/polygon.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/62f2b220-4640-4c35-98be-42ccd9ea0c15\/polygon.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/62f2b220-4640-4c35-98be-42ccd9ea0c15\/polygon.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/polygon.png?w=900\" sizes=\"100vw\" alt=\"SVG polygon\"><\/a><figcaption>\n      SVG polygon (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/62f2b220-4640-4c35-98be-42ccd9ea0c15\/polygon.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>Some polygons are regular polygons. What is special about regular polygons is that all of their sides and angles are equal. To draw regular polygons, such as a hexagon or a pentagon, you can use a <em>Polygon<\/em> tool, same in Illustrator, Sketch and Figma. <em>Polygon<\/em> tools in Illustrator and Sketch will generate <code><polygon \/><\/code> elements in SVG. In Figma, on the other hand, all shapes made with a <em>Polygon<\/em> tool result in <code><path \/><\/code> elements.<\/p>\n<p>All three design tools also have dedicated <em>Star<\/em> tools to draw stars. However, when it comes to export, shapes created with <em>Star<\/em> tools behave exactly the same as those created with <em>Polygon<\/em> tools. In SVG, stars are just polygons, there is NO <code>~~<star \/>~~<\/code> element.<\/p>\n<p>It\u2019s important to remember that <em>Star<\/em> and <em>Polygon<\/em> tools are used to create regular stars and polygons, while the <code><polygon \/><\/code> element in SVG can be used for any polygon, regular or irregular.<\/p>\n<h3>All Roads Lead To <code><path \/><\/code><\/h3>\n<p>As we already learned, in SVG, there are three basic shapes dedicated to drawing shapes made out of straight lines: <code><line \/><\/code>, <code><polyline \/><\/code> and <code><polygon \/><\/code>. But what if we\u2019d like our lines to be curved? It\u2019s a high time we spoke about the <code><path \/><\/code> element.<\/p>\n<h4>The <code><path \/><\/code> Element<\/h4>\n<p><code><path \/><\/code> is the most versatile SVG element. It can be used to draw any possible line and shape, including, but not limited to, all the basic shapes listed above. In fact, every basic shape (<code><circle\/><\/code>, <code><ellipse \/><\/code>, <code><rect \/><\/code>, <code><line \/><\/code>, <code><polyline \/><\/code>, <code><polygon \/><\/code>) can be described as a <code><path \/><\/code> element. What is more, there are many shapes that can be created with <code><path \/><\/code> but are not possible to create with any other SVG element. To learn more about <code><path \/><\/code> and its syntax, I would recommend you to check out <a href=\"https:\/\/css-tricks.com\/svg-path-syntax-illustrated-guide\/\">this excellent article by Chris Coyier<\/a>.<\/p>\n<p>Now, how do we create <code><path \/><\/code> elements in design tools? First of all, as we learned above, some of the layers created with shape tools compute to <code><path \/><\/code> elements even though they theoretically could be other elements (e.g. Figma exports all polygons as <code><path \/><\/code>s even though they could have been defined as  <code><polygon \/><\/code>s. Then, every other irregular shape we draw with a <em>Pen<\/em> tool or <em>a Vector<\/em> tool must be exported as <code><path \/><\/code> as there\u2019s no other SVG element that could define them. Finally, in Sketch and Figma, we can convert any basic shape into a layer that computes to a <code><path \/><\/code>. In Sketch, we can accomplish this by choosing <em>Layer > Combine > Flatten<\/em>, while is Figma we can find this function under <em>Object > Flatten Selection<\/em> (<kbd>?<\/kbd> + <kbd>E<\/kbd> on macOS, <kbd>Ctrl<\/kbd> + <kbd>E<\/kbd> on Windows).<\/p>\n<h4>Boolean Operations<\/h4>\n<p>Boolean operations are functions performed on shapes to combine them in a few different ways. In Illustrator, Sketch and Figma, there are 4 standard boolean operations:<\/p>\n<ul>\n<li><strong>Union (Unite)<\/strong><br \/>\nA sum of the shapes<\/li>\n<li><strong>Subtract (Minus front)<\/strong><br \/>\nBottom shape subtracted by the common area between the shapes<\/li>\n<li><strong>Intersect<\/strong><br \/>\nThe common area between the shapes<\/li>\n<li><strong>Difference (Exclude)<\/strong><br \/>\nA sum of the shapes subtracted by the common area between the shapes.<\/li>\n<\/ul>\n<p>In Illustrator, all of these functions generate a single shape (outline). It is an action that cannot be reversed \u2014 otherwise than using <em>Undo<\/em> (<kbd>?<\/kbd> + <kbd>Z<\/kbd> on macOS, <kbd>Ctrl<\/kbd> + <kbd>Z<\/kbd> on Windows). In Sketch and Figma, on the other hand, boolean operations create layer groups that can be ungrouped later on without any harm caused to the shapes inside. However, you can merge these groups into a single shape to achieve a similar result as in Illustrator using <em>Flatten<\/em> functions mentioned in the previous paragraph.<\/p>\n<p>The question is, does SVG support boolean operations? No, it doesn\u2019t. They just get merged. Therefore, every combined shape you create with boolean operations in Figma or Sketch will be exported as a single <code><path \/><\/code> element.<\/p>\n<h3>It Looks The Same, So Why Does It Matter?<\/h3>\n<p>In terms of how different shapes can be defined in SVG, its syntax is extremely versatile. Let\u2019s consider a basic rectangle:<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e53e4181-66ab-40db-ba78-d2f10025657a\/rectangle-example.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/rectangle-example.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e53e4181-66ab-40db-ba78-d2f10025657a\/rectangle-example.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e53e4181-66ab-40db-ba78-d2f10025657a\/rectangle-example.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e53e4181-66ab-40db-ba78-d2f10025657a\/rectangle-example.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e53e4181-66ab-40db-ba78-d2f10025657a\/rectangle-example.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/rectangle-example.png?w=900\" sizes=\"100vw\" alt=\"Nothing more than a rectangle\"><\/a><figcaption>\n      Nothing more than a rectangle (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/e53e4181-66ab-40db-ba78-d2f10025657a\/rectangle-example.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>Such a shape can be defined in SVG in a few different ways. It can be a <code><rect \/><\/code> element, a <code><polygon \/><\/code> element. It definitely can be a <code><path \/><\/code> element (as everything can be a <code><path \/><\/code> element). It can also be a <code><line \/><\/code> element (or a <code><polyline \/><\/code> element) if we decide to create it using strokes instead of fills.<\/p>\n<p>Each of these elements renders a rectangle that looks exactly the same:<\/p>\n<table>\n<tbody>\n<tr>\n<td>rectangle<\/td>\n<td><code><rect width=\"2\" height=\"3\" fill=\"black\"\/><\/code><\/td>\n<\/tr>\n<tr>\n<td>polygon<\/td>\n<td><code><polygon points=\"0,0 2,0 2,3 0,3\" fill=\"black\"\/><\/code><\/td>\n<\/tr>\n<tr>\n<td>line<\/td>\n<td><code><line x1=\"1\" y1=\"0\" x2=\"1\" y2=\"3\" stroke=\"black\" stroke-width=\"2\"\/><\/code><\/td>\n<\/tr>\n<tr>\n<td>path<\/td>\n<td>e.g. <code><path d=\"M0,0 l2,0 l0,3 l-2,0\" fill=\"black\"\/><\/code> or <code><path d=\"M1,0 l0,3\" stroke=\"black\" stroke-width=\"2\"\/><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>But, if the final result (the graphic rendered by a user agent in a browser) looks the same, does it really matter what approach do we choose? Well, it does. As a rule of a thumb, I would always recommend using basic shapes where possible.<\/p>\n<p>Last but not least, use the most obvious shapes for the given case. For example, don\u2019t create rectangles with lines or circles with rectangles if you don\u2019t have a good reason. There are at least a few arguments behind that:<\/p>\n<ol>\n<li><strong>Semantics\/Readability<\/strong><br \/>\nCompression tools, such as <a href=\"https:\/\/github.com\/svg\/svgo\">SVGO<\/a>, give you an option to compute all the basic shapes to path elements. It can save you a few bites but will definitely lower the readability of your code. <code><path \/><\/code> syntax is extremely unintuitive, so if your SVG is ever about to be modified in a code editor rather than a design tool, it will be so much easier to understand it if you keep the basic shapes as basic shapes.<\/li>\n<li><strong>File Size<\/strong><br \/>\nCompressing shapes to paths may help you minify files but it\u2019s not always the case! For example, a rounded rectangle takes much more space as a <code><path \/><\/code> than as a <code><rect \/><\/code>.<\/li>\n<li><strong>Animations<\/strong><br \/>\nHave you ever tried to animate SVG? It\u2019s a lot of fun \u2014 as long as you operate on clean, semantic SVG. With basic shapes, you can easily manipulate such parameters as radius, width, height or position of the point. If you merge your shapes into paths, most of those operations will be much harder to achieve or simply impossible.<\/li>\n<li><strong>Variants\/Responsiveness<\/strong><br \/>\nRemember that SVG is not a static image such as JPG. You can style it, theme it, make it responsive, and so on. Same as with animations, keeping your file well-structured and semantic will definitely help you with any of those tasks.<\/li>\n<\/ol>\n<p>As with every rule, you can find some exceptions. But, on a general basis, it\u2019s good practice to keep your SVG as readable, flexible and structured as possible.<\/p>\n<p>Now, let\u2019s take a look at other attributes and features such as viewBox, groups, transforms and visual effects.<\/p>\n<h3><code>width<\/code>, <code>height<\/code> and <code>viewBox<\/code><\/h3>\n<p>If you already have some experience with SVG, you probably noticed that the opening <code><svg><\/code> tag often has the following attributes: <code>width<\/code>, <code>height<\/code> and <code>viewBox<\/code>. In design tools, we have dimensions of artboards (or frames in case of Figma). So how exactly these values are related to each other?<\/p>\n<p>Let\u2019s start with explaining the <code><svg><\/code> attributes we just mentioned. You can think of a <code>viewBox<\/code> as of a virtual canvas in the form of a coordinate system. The centre of this coordinate system is placed in the top left corner of the designated area. All items within the <code><svg viewBox=\"\u2026\"><\/code> tag are placed according to this coordinate system and also clipped by it \u2014 anything that overflows the <code>viewBox<\/code> won\u2019t be rendered. <code>viewBox<\/code> accepts 4 numbers as its value:<\/p>\n<pre><code><svg viewBox=\"0 0 12 8\"> \u2026 <\/svg><\/code><\/pre>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/b916620c-1b4f-4c3c-889a-1ef9eaf85e23\/viewbox.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/viewbox.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/b916620c-1b4f-4c3c-889a-1ef9eaf85e23\/viewbox.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/b916620c-1b4f-4c3c-889a-1ef9eaf85e23\/viewbox.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/b916620c-1b4f-4c3c-889a-1ef9eaf85e23\/viewbox.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/b916620c-1b4f-4c3c-889a-1ef9eaf85e23\/viewbox.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/viewbox.png?w=900\" sizes=\"100vw\" alt=\"viewBox model in SVG\"><\/a><figcaption><code>viewBox<\/code> model in SVG (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/b916620c-1b4f-4c3c-889a-1ef9eaf85e23\/viewbox.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>As SVG stands for <strong>Scalable<\/strong> Vector Graphics, no units are needed on these numbers. Just imagine it as an abstract coordinate system that can be scaled up and down to any size. Don\u2019t worry too much about the first two numbers, most likely you won\u2019t need them. The latter two are what usually matters. These are the actual dimensions of our SVG canvas.<\/p>\n<p><code>viewBox<\/code> doesn\u2019t determine SVG\u2019s size. It just specifies the coordinates of the area in which our SVG is drawn. Therefore, when used on the web, <code><svg><\/code> with a specified <code>viewBox<\/code> will always take all the available space and preserve the ratio set by the <code>viewBox<\/code> \u2014 unless we prevent this with CSS or set the <code>width<\/code> and\/or <code>height<\/code> attributes.<\/p>\n<p><code>width<\/code> and <code>height<\/code> are the <code><svg><\/code> attributes that set the actual width and height of the SVG element. On the contrary to <code>viewBox<\/code>, they should use specified units such as pixels, ems or rems. This means that we can also transform the SVG with them \u2014 if the ratio between the <code>width<\/code> and <code>height<\/code> is different than the ratio between the values of the <code>viewBox<\/code>, SVG will skew the graphic specified within the <code>viewBox<\/code> according to the <code>width<\/code> and <code>height<\/code> values:<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/2044e846-84b3-4f72-a1a5-55e788daeada\/viewbox-width-height.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/viewbox-width-height.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/2044e846-84b3-4f72-a1a5-55e788daeada\/viewbox-width-height.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/2044e846-84b3-4f72-a1a5-55e788daeada\/viewbox-width-height.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/2044e846-84b3-4f72-a1a5-55e788daeada\/viewbox-width-height.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/2044e846-84b3-4f72-a1a5-55e788daeada\/viewbox-width-height.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/viewbox-width-height.png?w=900\" sizes=\"100vw\" alt=\"viewBox\u2019s aspect ratio is 3:2 but its width and height attributes make it display as a square\"><\/a><figcaption><code>viewBox<\/code>\u2019s aspect ratio is 3:2 but its width and height attributes make it display as a square. (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/2044e846-84b3-4f72-a1a5-55e788daeada\/viewbox-width-height.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>Now, what happens when we export SVG from design tools? In Sketch and Figma, all assets (no matter if they\u2019re single layers, groups or artboards) will always get a <code>viewBox<\/code> equal to the dimensions of the exported element and <code>width<\/code> and <code>height<\/code> set in pixels, equal to the last two values of the <code>viewBox<\/code>. In Illustrator, all assets have a <code>viewBox<\/code>, specified the same way as in Sketch and Figma, but no <code>width<\/code> and <code>height<\/code> applied.<\/p>\n<h3>Groups<\/h3>\n<p>Groups are the basic mean of organizing layers in design tools. Apart from setting hierarchy, groups are used to apply bulk operations, such as transforms, to multiple elements. There\u2019s no significant difference in how groups work across Illustrator, Sketch and Figma and, fortunately, the basic functionality of SVG groups (<code><g>\u2026<\/g><\/code>) is pretty much the same.<\/p>\n<h3>Transforms<\/h3>\n<p>In SVG, there are five basic transforms that we can apply to an element:<\/p>\n<ol>\n<li><code>translate<\/code>: moves the element along the vertical and\/or horizontal axis;<\/li>\n<li><code>scale<\/code>: scales the element along the vertical and\/or horizontal axis:<\/li>\n<li><code>rotate<\/code>: creates a two-dimensional rotation by a given angle specified in degrees around a given point;<\/li>\n<li><code>skew<\/code> (<code>skewX<\/code> or <code>skewY<\/code>): skews the element by a given angle specified in degrees along the vertical or horizontal axis;<\/li>\n<li><code>matrix<\/code>: the most complex and versatile of available transform functions. As it would require quite a lot of algebra talk to explain how matrix transformations work, it goes far beyond the scope of this article. Let\u2019s just acknowledge that <code>matrix<\/code> allows you to perform many complicated transforms such as stretching, squeezing, shearing, and so on.<\/li>\n<\/ol>\n<p><strong>Note<\/strong>: <em>Notice that even though some of the SVG transforms look very similar to CSS transforms, they are not the same. For example, CSS offers both 2D and 3D rotation functions while SVG has only one 2D rotate function. Also, while CSS accepts various angle units such as degrees or radians, SVG rotations are always set in degrees, therefore a unit can be omitted (e.g.<\/em> <code>rotate(45)<\/code>, <strong>NOT<\/strong> <code>~~rotate(45deg)~~<\/code><em>).<\/em><\/p>\n<p>All of these transforms can be applied to any SVG element, such as shapes or groups, and are non-destructive, i.e. do not affect the original geometry of the element. We apply transforms via a <code>transform<\/code> attribute:<\/p>\n<pre><code><g transform=\"scale(3) rotate(90) translate(50,100)\"> \u2026 <\/g><\/code><\/pre>\n<p>Let\u2019s take a look at the design tools now! So, most of the transforms we apply in design tools interact directly with the objects\u2019 geometry and their position on the canvas. They are not independent from the shapes and will not be exported as SVG transform functions.<\/p>\n<p>Rotations are here the exception, with their values being stored in the <em>Inspector<\/em> separately from the element\u2019s geometry and they do export as a <code>transform=\"rotate(\u2026)\"<\/code> function.<\/p>\n<p>Interestingly, the same rule applies to flips (reflections) in Sketch and Figma (not in Illustrator!). Each of them has its own approach though. Sketch uses a combination of negative scaling and translating to achieve a flip effect, while Figma performs a flip within a single matrix function.<\/p>\n<h3>Border Radius<\/h3>\n<p>We already spoke about rounded rectangles but what about rounding other shapes? In fact, in all the designs tools we discuss, you can round the corners of any shape, not only a rectangle.<\/p>\n<p>But what about SVG? Do <code><polygon \/><\/code> and <code><path \/><\/code> elements also have a <code>rx<\/code> and <code>ry<\/code> attributes? Unfortunately, no. Any shape other than a rectangle, once you round any of its corners, will always be exported as a <code><path \/><\/code> element treating the rounded corners as an integral part of the shape\u2019s geometry.<\/p>\n<h3>Fills And Strokes<\/h3>\n<p>Illustrator, Sketch and Figma all support fills and strokes as the basic properties of any shapes, and so it happens in SVG. Therefore, fills specified in design tools are exported within a <code>fill<\/code> attribute and stokes are exported within a <code>stroke<\/code> attribute. Don\u2019t think it\u2019s all that straightforward though. The devil is in the details.<\/p>\n<h4>Color Fill<\/h4>\n<p>Color fill is the most basic of available fills and is specified with a single plain color (e.g. <code>#3fd8e2<\/code>). In SVG, this value is put directly in the <code>fill<\/code> attribute (e.g. <code>fill=\"#3fd8e2\"<\/code>).<\/p>\n<p>Design tools export color fills with hex values (e.g. <code>#0000ff<\/code>), although, in SVG, you can also use all the other naming schemes known to CSS, such as color names (e.g. <code>blue<\/code>), RGB values (e.g. <code>rgb(0,0,255)<\/code>) or even HSL values (e.g. <code>hsl(240,100%,50%)<\/code>).<\/p>\n<h4>Fill Opacity<\/h4>\n<p>When it comes to fill opacity, SVG accepts semi-transparent colors (e.g. RGBA values), although it also provides a <code>fill-opacity<\/code> attribute. Because of compatibility issues, using <code>fill-opacity<\/code> is a recommended approach and it is also the one used by Figma and Sketch. (I\u2019m not mentioning Illustrator here, as Illustrator does not allow you to control fill opacity.) So, if you want to create an SVG square filled with half-transparent red color, you can do the following:<\/p>\n<pre><code><rect width=\"100\" height=\"100\" fill=\"rgba(255,0,0,0.5)\" \/><\/code><\/pre>\n<p>but a more recommended approach (used by Sketch and Figma) would be:<\/p>\n<div>\n<pre><code><rect width=\"100\" height=\"100\" fill=\"#ff0000\" fill-opacity=\"0.5\" \/><\/code><\/pre>\n<\/div>\n<h4>Gradient Fill<\/h4>\n<p>If you\u2019re familiar with CSS, you may know that when it comes to backgrounds, switching between color and gradient backgrounds is relatively straightforward. The same <code>background-color<\/code> (or <code>background<\/code>) property can be used in both cases. As gradients in SVG are much older than CSS gradients, their syntax is also quite different.<\/p>\n<p>To use a gradient is SVG, you first need to define it within the <code><defs>\u2026<\/defs><\/code> tags and then refer to it in a <code>fill<\/code> attribute, e.g.:<\/p>\n<pre><code><defs>\n  <linearGradient id=\"myGradient\">\n      <stop stop-color=\"red\" offset=\"0%\"><\/stop>\n      <stop stop-color=\"blue\" offset=\"100%\"><\/stop>\n  <\/linearGradient>\n<\/defs>\n\n<rect fill=\"url(#myGradient)\" \/>\n<\/code><\/pre>\n<p>So, what happens during SVG export when you use a gradient fill is that a gradient is added to the <code><defs><\/code> and it\u2019s being referenced in the code below.<\/p>\n<p>An important thing to remember is that that SVG supports only linear and radial gradients. Effects such as angular gradient or gradient mesh won\u2019t be exported to SVG.<\/p>\n<h4>Pattern\/Image Fill<\/h4>\n<p>Sketch and Figma also offer an Image fill where a raster graphic is used either to fill the entire element or as a repeating pattern.<\/p>\n<p>When it comes to exporting Image fills to SVG, it\u2019s actually quite similar to gradients. Images are being defined in the <code><defs><\/code> with a <code><pattern>\u2026<\/pattern><\/code> element and then referenced within a <code>fill<\/code> attribute:<\/p>\n<pre><code><defs>\n  <pattern id=\"myPattern\" patternUnits=\"objectBoundingBox\">\n    <use xlink:href=\"#picture\"><\/use>\n  <\/pattern>\n<\/defs>\n\n<rect fill=\"url(#myPattern)\" \/>\n<\/code><\/pre>\n<p>To make it work, the referenced <code>#picture<\/code> image must be defined <em>somewhere<\/em>. The design tools will embed them directly in SVG as <code><image\/><\/code> elements, although it\u2019s not a recommended approach when it comes to performance. If you really need to use raster images in your SVG, I would suggest to remove the image tag from the SVG and use it a standalone file instead:<\/p>\n<pre><code><defs>\n  <pattern id=\"myPattern\" patternUnits=\"objectBoundingBox\">\n    <use xlink:href=\"#picture\"><\/use>\n  <\/pattern>\n  \n  <image xlink:href=\"image.png\" id=\"picture\"\/>\n<\/defs>\n\n<rect fill=\"url(#myPattern)\" \/>\n<\/code><\/pre>\n<h4>Strokes<\/h4>\n<p><code>stroke<\/code> attribute in SVG, same as <code>fill<\/code> attribute accepts colors in various formats, e.g. hex, RGB or HSL. And similarly to <code>fill<\/code>, you can control stroke\u2019s opacity with <code>stroke-opacity<\/code>. Also, same as with <code>fill<\/code>, strokes can use gradients as their value. All of those effects can be achieved in design tools and successfully exported to SVG.<\/p>\n<h5>Stroke Caps And Joins<\/h5>\n<p>There are also a few stroke specific attributes though. First, you can control the stroke width. Design tools support it and its exported as <code>stroke-width<\/code> attribute. You can also control ends and joins of the strokes. SVG allows you to define them via <code>stroke-linecap<\/code> and <code>stroke-linejoin<\/code> attributes. There are three possible caps: <code>butt<\/code> cap, <code>round<\/code> cap and <code>square<\/code> cap, and three possible joins: <code>miter<\/code> join, <code>round<\/code> join and <code>bevel<\/code> join. Both caps and joins can be controlled in Illustrator, Figma and Sketch and available caps and joins are matching those available in SVG.<\/p>\n<h5>Dashed And Dotted Strokes<\/h5>\n<p>Another effect we can achieve with strokes is dashed strokes. In Illustrator and Figma, you can set multiple dashes and gaps, while in Sketch, only a single sequence of a dash and a gap is possible.<\/p>\n<p>SVG allows you to create dashed lines with a <code>stroke-dasharray<\/code> attribute. <code>stroke-dasharray<\/code> allows a sequence of multiple dashes and gaps to be passed as its value which matches Figma\u2019s and Illustrator\u2019s features. It also means Sketch does not allow you to use the full possibilities of SVG in this case.<\/p>\n<p>An interesting edge case is a dotted line. We achieve it by setting the <code>stroke-linecap<\/code> to <code>round<\/code> and a dash\u2019s length to zero, e.g.:<\/p>\n<div>\n<pre><code><line \u2026 stroke=\"black\" stroke-dasharray=\"0 2\" stroke-linecap=\"round\"\/><\/code><\/pre>\n<\/div>\n<p><strong>Note<\/strong>: <em>Currently, Figma users experience a bug that doesn\u2019t allow them to create dotted lines. For example, using<\/em> <code>0, 10<\/code> <em>or<\/em> <code>10, 0<\/code> <em>as Dashes is interpreted the same way as<\/em> <code>10, 10<\/code> <em>and gives a regular dashed line rather than a dotted line. Fortunately, there\u2019s a way to get around it. Rather than using zero, use a very small value, e.g.<\/em> <code>0.0001, 10<\/code> <em>\u2014 this should result in perfectly dotted line, as expected.<\/em><\/p>\n<h5>Stroke Alignment<\/h5>\n<p>There is one other, much more significant difference between design tools and SVG: stroke alignment. Illustrator, Sketch and Figma all allow you to control the alignment of the stroke and set it inside, outside or centre-align it. But guess what? SVG 1.1 does not support stroke alignment. In SVG, all strokes are centre-aligned strokes. No inside strokes or outside strokes. Which is why some very weird things happen when you\u2019re exporting your outside- and inside- aligned strokes to SVG.<\/p>\n<p>Illustrator, in such case, exports the shape and its stroke as two separate shapes. So if you apply an inside stroke or an outside stroke to a rectangle in Illustrator, in SVG it will result in a rectangle and a separate <code><path \/><\/code> element representing the rectangle\u2019s stroke, e.g.:<\/p>\n<pre><code><rect x=\"10\" y=\"10\" width=\"120\" height=\"120\"\/>\n<path d=\"M120,20V120H20V20H120M140,0H0V140H140V0Z\"\/>\n<\/code><\/pre>\n<p>This behavior has some very important repercussions. For example, you can no longer change the width of the stroke or make it dashed. It also won\u2019t scale the same way as \u201creal\u201d strokes. What is more, Illustrator changes the dimensions of the original shape, e.g. a 100\u00d7100 square with a 20-units bold inner stroke will actually export as a 120\u00d7120 square to avoid rendering issues. Eventually, it\u2019s just not a stroke. It\u2019s just another shape with a fill.<\/p>\n<p>Figma and Sketch have a different approach though. They faithfully export all strokes as strokes but they recalculate the dimensions of the shape. So if you have a circle with a radius equal to 5 and an inside stroke equal to 2, what you\u2019ll find in your SVG will be a circle with a radius equal to 4 (and a stroke still equal to 2).<\/p>\n<p>This approach allows Figma and Sketch to avoid most of the issues mentioned in the case of Illustrator. However, with some more complicated shapes this technique may turn out not to be precise and the final result to be a bit different than expected. With is why Sketch\u2019s and Figma\u2019s approach is not necessarily better \u2014 it\u2019s definitely more semantic, performant and flexible, but Illustrator\u2019s solution is more accurate.<\/p>\n<p><strong>Note:<\/strong> <em>The same problem with stroke alignment applies to CSS as well. The CSS<\/em> <code>border<\/code> <em>property does not support inside or outside alignment neither. However, if you want, you can hack this behavior with<\/em> <code>outline<\/code> <em>and<\/em> <code>box-shadow<\/code> <em>properties.<\/em><\/p>\n<h5>Multiple Fills And Strokes<\/h5>\n<p>In design tools, you can add multiple fills and strokes per layer. This makes a lot of sense once combined with such attributes as opacity and blend modes. Unfortunately, SVG does not support such a feature. If you export a layer that has fills and\/or strokes, it will get multiplied and each of the strokes and fills applied to its own layer.<\/p>\n<h3>Shadows, Filters, And Other Effects<\/h3>\n<p>Let\u2019s talk about some less popular effects now. SVG is a very powerful language, in fact much more powerful than how it\u2019s usually used on the web. One of the most interesting SVG\u2019s features is a wide range of advanced visual effects, known as SVG filters.<\/p>\n<p>The full scope of SVG filter\u2019s possibilities is far too wide to be described in this article. If you\u2019d like to learn more about them I strongly recommend you to check out some <a href=\"https:\/\/www.sarasoueidan.com\/blog\/svg-filters\/\">talks and articles on this topic by Sarah Soueidan<\/a>.<\/p>\n<p>Filters, same as patterns or gradients, need to be defined to apply them later to a layer. Every filter is defined as a <code><filter>\u2026<\/filter><\/code> element that can contain numerous effects, known as <em>filter primitives<\/em>, each standing for a separate visual effect.<\/p>\n<p>Filter primitives can be combined together to create filters. For example, this is what a basic blur effect applied to a rectangle looks like:<\/p>\n<pre><code><defs>\n  <filter id=\"GaussianBlur\">\n    <feGaussianBlur stdDeviation=\"10\"\/>\n  <\/filter>\n<\/defs>\n\n<rect filter=\"url(#GaussianBlur)\" width=\"200\" height=\"300\"\/>\n<\/code><\/pre>\n<p>\u2026but you can also create a more complex filter that consists of more than one filter primitive:<\/p>\n<div>\n<pre><code><defs>\n  <filter id=\"GaussianBlur\">\n    <feGaussianBlur stdDeviation=\"10\"\/>\n    <feMorphology operator=\"dilate\" in=\"SourceGraphic\" radius=\"3\" \/>\n  <\/filter>\n<\/defs>\n\n<rect filter=\"url(#GaussianBlur)\" width=\"200\" height=\"300\"\/>\n<\/code><\/pre>\n<\/div>\n<p>Out of the three design tools we discuss, only Illustrator lets you play with SVG filters. You can find them in the app\u2019s menu, under <em>Effect > SVG Filters<\/em>. Sketch and Figma are a completely different story. Any effects these applications offer are mostly focused on CSS and native implementations, e.g. <em>Background Blur<\/em> effect was implemented primarily for designing iOS apps and <em>Drop\/Inner Shadow<\/em> effects parameters are matching CSS properties (<code>box-shadow<\/code> and <code>text-shadow<\/code>).<\/p>\n<p>It doesn\u2019t mean we can\u2019t export these effects to SVG. We can. However, translating these effects to SVG is utterly not as straightforward as to CSS. Let\u2019s consider a square with a drop shadow applied.<\/p>\n<figure><a href=\"https:\/\/i0.wp.com\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/d666f4b9-a1ed-4281-83f0-554d49b33770\/rectangle-shadow.png?ssl=1\"><\/p>\n<p>    <img data-recalc-dims=\"1\" decoding=\"async\" srcset=\"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/rectangle-shadow.png 400w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_800\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/d666f4b9-a1ed-4281-83f0-554d49b33770\/rectangle-shadow.png 800w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1200\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/d666f4b9-a1ed-4281-83f0-554d49b33770\/rectangle-shadow.png 1200w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_1600\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/d666f4b9-a1ed-4281-83f0-554d49b33770\/rectangle-shadow.png 1600w,\n\t\t\t        https:\/\/res.cloudinary.com\/indysigner\/image\/fetch\/f_auto,q_auto\/w_2000\/https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/d666f4b9-a1ed-4281-83f0-554d49b33770\/rectangle-shadow.png 2000w\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/rectangle-shadow.png?w=900\" sizes=\"100vw\" alt=\"A rectangle with a shadow\"><\/a><figcaption>\n      A rectangle with a shadow (<a href=\"https:\/\/cloud.netlifyusercontent.com\/assets\/344dbf88-fdf9-42bb-adb4-46f01eedd629\/d666f4b9-a1ed-4281-83f0-554d49b33770\/rectangle-shadow.png\">Large preview<\/a>)<br \/>\n    <\/figcaption><\/figure>\n<p>This is how our square could look like, once exported to HTML\/CSS:<\/p>\n<pre><code><style>\n  .square {\n    width: 100px;\n    height: 100px;\n    background: red;\n    box-shadow: 10px 10px 24px 0 rgba(0,0,0,0.5);\n  }\n<\/style>\n\n<div class=\"square\"><\/div>\n<\/code><\/pre>\n<p>A similar square exported from Sketch to SVG gives us a significantly more complex piece of code:<\/p>\n<div>\n<pre><code><defs>\n  <rect id=\"square\" x=\"14\" y=\"14\" width=\"100\" height=\"100\"><\/rect>\n  <filter x=\"-31.0%\" y=\"-31.0%\" width=\"182.0%\" height=\"182.0%\" filterUnits=\"objectBoundingBox\" id=\"filter-2\">\n      <feOffset dx=\"10\" dy=\"10\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\"><\/feOffset>\n      <feGaussianBlur stdDeviation=\"12\" in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\"><\/feGaussianBlur>\n      <feColorMatrix values=\"0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.5 0\" type=\"matrix\" in=\"shadowBlurOuter1\"><\/feColorMatrix>\n  <\/filter>\n<\/defs>\n\n<g id=\"Rectangle\">\n    <use fill=\"black\" filter=\"url(#filter-2)\" xlink:href=\"#square\"><\/use>\n    <use fill=\"#FF0000\" fill-rule=\"evenodd\" xlink:href=\"#square\"><\/use>\n<\/g>\n<\/code><\/pre>\n<\/div>\n<p>What happens here is that Sketch duplicates the square, so we have two identical squares, one above another, and turns the duplicate into a shadow.<\/p>\n<p>To accomplish this, it applies a filter to a duplicated square that consists of three different filter primitives:<\/p>\n<ul>\n<li>one to offset the square;<\/li>\n<li>one to set its color to semi-transparent black;<\/li>\n<li>one to blur it.<\/li>\n<\/ul>\n<p>In other design tools, we would encounter a similar situation.<\/p>\n<p>It doesn\u2019t mean that we should never, by all means, use shadows in SVG. It\u2019s handy to keep in mind though that as long as SVG gives you a very powerful toolkit to modify your graphics, some seemingly simple effects are not that simple to achieve at all.<\/p>\n<h4>Blend Modes<\/h4>\n<p>Blend modes (such as <em>Darken<\/em>, <em>Multiply<\/em> or <em>Overlay<\/em>) allow blending two or more elements by combining their values in different ways. Well known to graphic designers (and applications such as Adobe Photoshop), blend modes work in Sketch, Figma and Illustrator as well.<\/p>\n<p>In SVG, blend modes exist as one of the filters. They have their own <code><feBlend \/><\/code> filter primitive. However, as <code><feBlend \/><\/code>\u2019s syntax is fairly complicated, Sketch, Figma and Illustrator use CSS instead:<\/p>\n<pre><code>.rectangle {\n    mix-blend-mode: overlay;\n}\n<\/code><\/pre>\n<p>With <code>mix-blend-mode<\/code> browser support being fairly good nowadays, it shouldn\u2019t be a big issue. However, if it\u2019s important for you to ensure bulletproof browser support that includes Microsoft Edge and IE, you will have to replace the CSS blend modes with SVG filters manually.<\/p>\n<p>Same as with multiple fills and strokes, SVG does not support blend modes applied directly on fill and stroke attributes (rather than on whole layers). If you try to export fill and strokes with their own blend modes from a design tool to SVG, the layer will get multiplied and the blend modes applied to respective copies of the layer.<\/p>\n<h3>Symbols And Components<\/h3>\n<p>In some of the code examples above, you may have noticed an element we haven\u2019t discussed yet: a <code><use>\u2026<\/use><\/code> element. <code><use><\/code> lets us define and reuse elements in SVG, a bit similar to Symbols in Illustrator and Sketch or Components in Figma. Remember defining patterns, gradients and filters within the <code><defs>\u2026<\/defs><\/code> tags so they can be used in some other part of your SVG code? In fact, any SVG element can be defined and reused this way. Once you defined a shape or a group, you can refer to it in the rest of the document as many times as you like, e.g.:<\/p>\n<pre><code>    <defs>\n<circle cx=\"100\" cy=\"100\" r=\"20\" id=\"circle\"\/>\n<\/defs>\n\n<use fill=\"red\" xlink:href=\"#circle\"> <\/use>\n<use fill=\"green\" xlink:href=\"#circle\"> <\/use>\n<use fill=\"blue\" xlink:href=\"#circle\"> <\/use>\n\u2026\n<\/code><\/pre>\n<p>You can also reuse much more complex structures using a <code><symbol>\u2026<\/symbol><\/code> tag. Symbol acts as a separate body within our SVG and can have its own <code>viewBox<\/code> attribute (see <a href=\"https:\/\/paper.dropbox.com\/doc\/SVG-Design-Tools-A-practical-guide--AafObWXb2iL5X3sZ0aVeZ_MaAg-Z4RmhEXt41v0AhP5hjNhO#:uid=565661092404952367767584&#038;h2=Width%2C-height-and-viewBox\">Width, height and viewBox<\/a> for reference).<\/p>\n<p>Does it mean our design tools\u2019 symbols and components will be exported to SVG symbols? In Illustrator \u2014 yes, it does. In Sketch and Figma \u2014 no, it doesn\u2019t. Why? Primarily, because Illustrator symbols are fairly simple and can be easily translated to SVG while Sketch\u2019s symbols and Figma\u2019s components are not that simple at all and exporting some of its features (such as nested overrides) would be very tricky or even impossible.<\/p>\n<h3>Text<\/h3>\n<p>It wouldn\u2019t be a comprehensive guide if we don\u2019t mention typography. All the design tools offer a wide variety of tools related to text. SVG, even though usually used for graphics, supports text elements too.<\/p>\n<p>Illustrator, Sketch and Figma all support exporting text to SVG and computes text layers into <code><text>\u2026<\/text><\/code> elements in SVG. SVG text elements are rendered like any other graphic elements, shapes etc. with the only difference is that they\u2019re text.<\/p>\n<p>Same as in CSS, we can control all the basic text\u2019s parameters, such as weight, line height or alignment. In fact, if you know how to style text in CSS, you already know how to do it in SVG. However, it may feel a bit old-school. Firstly, all the parameters must be set in inline attributes, similarly to the golden standards of HTML 3.2. Secondly, there are no shorthands. For example, you won\u2019t find anything resembling a <code>font<\/code> CSS property. That\u2019s because SVG text attributes are actually based on CSS 2 spec which takes us back to the 90ties and are way older than CSS we know today.<\/p>\n<p>Nonetheless, all of those attributes are being exported from the design tools perfectly well every time we want some text layer to become SVG code.<\/p>\n<h4>Custom Fonts<\/h4>\n<p>Unfortunately, things get a bit tricky when it comes to custom fonts. Back in the days, when SVG 1 standard was being created, custom typefaces weren\u2019t a common thing to the web. Everybody used standard fonts, such as Tahoma, Verdana or Courier. Going fancy and using fonts people didn\u2019t have on their machines by default, usually meant rasterizing them ruthlessly and using them as images. However, SVG implemented its own fonts format, named SVG fonts. Today, 18 years after the SVG 1.0 was published, SVG fonts are no longer supported in most of the major browsers.<\/p>\n<p>Luckily for us, SVG plays very nicely with CSS, which means we can use web fonts instead of SVG fonts, e.g.:<\/p>\n<div>\n<pre><code><style>\n    @import url(\"https:\/\/fonts.googleapis.com\/css?family=Roboto\");\n<\/style>\n\n<text x=\"20\" y=\"50\" font-family=\"Roboto\">Text<\/text>\n<\/code><\/pre>\n<\/div>\n<p>Let me not get into detail of implementing web fonts here apart from one crucial note: don\u2019t forget about it. In other words, if you use custom fonts in your SVG, you need to remember about providing these fonts to the client, the same as in HTML\/CSS.<\/p>\n<h4>Outlining Fonts<\/h4>\n<p>One may argue that much easier than warring about fonts and all, would be to outline all the text layers and don\u2019t worry about them ever after. Nonetheless, there are at least a few good reasons not to change your text to shapes:<\/p>\n<ol>\n<li><strong>You can\u2019t edit outlined text \u2014 before nor after export.<\/strong><br \/>\nWorking with outlined text, you need to remember about keeping an editable copy in your Illustrator, Sketch or Figma file at all times. Otherwise, you won\u2019t be able to edit your text layers, once they are outlined. This adds unnecessary complexity to the process. Not to mention editing the outlined text after the SVG was exported. Text in SVG can be updated at any time. Outlined text requires opening the source file every time you want to make the tiniest copy change.<\/li>\n<li><strong>Outlined text is not accessible<\/strong>.<br \/>\nText in SVG, same as other text elements on the web, can be read by screen readers and other accessible technologies. By outlining text layers, you prevent people from using such technologies from accessing your content.<\/li>\n<li><strong>People expect text to be text<\/strong>.<br \/>\nMost people using the web know absolutely nothing about SVG, HTML or design tools. If they see text, they expect it to be just that. They may want to select it, copy it or put in a search engine. All of this is possible with text in SVG \u2014 unless you outline it.<\/li>\n<li><strong>Don\u2019t forget about SEO<\/strong>.<br \/>\nText in SVG is also accessible and used by search engines. By outlining text, you make your content less searchable and potentially less visible to the public.<\/li>\n<\/ol>\n<h3>Summary<\/h3>\n<p>Thank you a lot for going with me on a journey through the ins and outs of working with SVG and design tools. This article definitely does not cover the full spectrum of the topic, although it should be enough to deal with the most common use cases. If you have any questions or queries regarding the things that have not been mentioned here, don\u2019t hesitate to post them in the comments!<\/p>\n<div>\n  <img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/logo-red-2.png?w=900\" alt=\"Smashing Editorial\"><span>(dm, yk, il)<\/span>\n<\/div>\n<\/article>\n<p class=\"wpematico_credit\"><small>Powered by <a href=\"http:\/\/www.wpematico.com\" target=\"_blank\">WPeMatico<\/a><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Practical Guide To SVG And Design Tools A Practical Guide To SVG And Design Tools Miko?aj Dobrucki 2019-05-03T14:00:59+02:002019-05-04T11:04:19+00:00 A good understanding of SVG is a rare skill. Surprisingly often, SVG is treated as just another image format. We use SVG because of its scalability and smaller file size, but in reality, SVG is so&#8230;<a class=\"moretag\" href=\"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/\"> Read the full article&#8230;<\/a><\/p>\n","protected":false},"author":4,"featured_media":64630,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[371],"tags":[],"class_list":["post-64629","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-user-experience"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"A Practical Guide To SVG And Design ToolsA Practical Guide To SVG And Design Tools Miko?aj Dobrucki 2019-05-03T14:00:59+02:002019-05-04T11:04:19+00:00A good understanding of SVG is a rare skill. Surprisingly often, SVG is treated as just another image format. We use SVG because of its scalability and smaller file size, but in reality, SVG is so much more!\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Guest Contribution\"\/>\n\t<meta name=\"keywords\" content=\"user experience\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Design for Immersive Technologies | User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"A Practical Guide To SVG And Design Tools | Design for Immersive Technologies\" \/>\n\t\t<meta property=\"og:description\" content=\"A Practical Guide To SVG And Design ToolsA Practical Guide To SVG And Design Tools Miko?aj Dobrucki 2019-05-03T14:00:59+02:002019-05-04T11:04:19+00:00A good understanding of SVG is a rare skill. Surprisingly often, SVG is treated as just another image format. We use SVG because of its scalability and smaller file size, but in reality, SVG is so much more!\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-05-04T11:19:56+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-05-04T11:19:56+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"A Practical Guide To SVG And Design Tools | Design for Immersive Technologies\" \/>\n\t\t<meta name=\"twitter:description\" content=\"A Practical Guide To SVG And Design ToolsA Practical Guide To SVG And Design Tools Miko?aj Dobrucki 2019-05-03T14:00:59+02:002019-05-04T11:04:19+00:00A good understanding of SVG is a rare skill. Surprisingly often, SVG is treated as just another image format. We use SVG because of its scalability and smaller file size, but in reality, SVG is so much more!\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/a-practical-guide-to-svg-and-design-tools\\\/#article\",\"name\":\"A Practical Guide To SVG And Design Tools | Design for Immersive Technologies\",\"headline\":\"A Practical Guide To SVG And Design Tools\",\"author\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.taterboy.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/ellipse.png?fit=400%2C300&ssl=1\",\"width\":400,\"height\":300},\"datePublished\":\"2019-05-04T04:19:56-07:00\",\"dateModified\":\"2019-05-04T04:19:56-07:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/a-practical-guide-to-svg-and-design-tools\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/a-practical-guide-to-svg-and-design-tools\\\/#webpage\"},\"articleSection\":\"User Experience\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/a-practical-guide-to-svg-and-design-tools\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.taterboy.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/#listItem\",\"name\":\"User Experience\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/#listItem\",\"position\":2,\"name\":\"User Experience\",\"item\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/a-practical-guide-to-svg-and-design-tools\\\/#listItem\",\"name\":\"A Practical Guide To SVG And Design Tools\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/a-practical-guide-to-svg-and-design-tools\\\/#listItem\",\"position\":3,\"name\":\"A Practical Guide To SVG And Design Tools\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/#listItem\",\"name\":\"User Experience\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\",\"name\":\"Design for Immersive Technologies\",\"description\":\"User Experience for Games, Virtual Reality (VR) and Augmented\\\/Mixed Reality (AR\\\/MR)\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/\",\"name\":\"Guest Contribution\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/a-practical-guide-to-svg-and-design-tools\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2aad73eb0f48c67b141e9fc978a0e498969791ed623346e361d02d19775b0bb?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Guest Contribution\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/a-practical-guide-to-svg-and-design-tools\\\/#webpage\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/a-practical-guide-to-svg-and-design-tools\\\/\",\"name\":\"A Practical Guide To SVG And Design Tools | Design for Immersive Technologies\",\"description\":\"A Practical Guide To SVG And Design ToolsA Practical Guide To SVG And Design Tools Miko?aj Dobrucki 2019-05-03T14:00:59+02:002019-05-04T11:04:19+00:00A good understanding of SVG is a rare skill. Surprisingly often, SVG is treated as just another image format. We use SVG because of its scalability and smaller file size, but in reality, SVG is so much more!\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/a-practical-guide-to-svg-and-design-tools\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.taterboy.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/05\\\/ellipse.png?fit=400%2C300&ssl=1\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/a-practical-guide-to-svg-and-design-tools\\\/#mainImage\",\"width\":400,\"height\":300},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/05\\\/a-practical-guide-to-svg-and-design-tools\\\/#mainImage\"},\"datePublished\":\"2019-05-04T04:19:56-07:00\",\"dateModified\":\"2019-05-04T04:19:56-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/\",\"name\":\"Design for Immersive Technologies\",\"description\":\"User Experience for Games, Virtual Reality (VR) and Augmented\\\/Mixed Reality (AR\\\/MR)\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"A Practical Guide To SVG And Design Tools | Design for Immersive Technologies","description":"A Practical Guide To SVG And Design ToolsA Practical Guide To SVG And Design Tools Miko?aj Dobrucki 2019-05-03T14:00:59+02:002019-05-04T11:04:19+00:00A good understanding of SVG is a rare skill. Surprisingly often, SVG is treated as just another image format. We use SVG because of its scalability and smaller file size, but in reality, SVG is so much more!","canonical_url":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/","robots":"max-image-preview:large","keywords":"user experience","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/#article","name":"A Practical Guide To SVG And Design Tools | Design for Immersive Technologies","headline":"A Practical Guide To SVG And Design Tools","author":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"publisher":{"@id":"https:\/\/www.taterboy.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/ellipse.png?fit=400%2C300&ssl=1","width":400,"height":300},"datePublished":"2019-05-04T04:19:56-07:00","dateModified":"2019-05-04T04:19:56-07:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/#webpage"},"isPartOf":{"@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/#webpage"},"articleSection":"User Experience"},{"@type":"BreadcrumbList","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.taterboy.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/#listItem","name":"User Experience"}},{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/#listItem","position":2,"name":"User Experience","item":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/#listItem","name":"A Practical Guide To SVG And Design Tools"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/#listItem","position":3,"name":"A Practical Guide To SVG And Design Tools","previousItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/#listItem","name":"User Experience"}}]},{"@type":"Organization","@id":"https:\/\/www.taterboy.com\/blog\/#organization","name":"Design for Immersive Technologies","description":"User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","url":"https:\/\/www.taterboy.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author","url":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/","name":"Guest Contribution","image":{"@type":"ImageObject","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d2aad73eb0f48c67b141e9fc978a0e498969791ed623346e361d02d19775b0bb?s=96&d=mm&r=g","width":96,"height":96,"caption":"Guest Contribution"}},{"@type":"WebPage","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/#webpage","url":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/","name":"A Practical Guide To SVG And Design Tools | Design for Immersive Technologies","description":"A Practical Guide To SVG And Design ToolsA Practical Guide To SVG And Design Tools Miko?aj Dobrucki 2019-05-03T14:00:59+02:002019-05-04T11:04:19+00:00A good understanding of SVG is a rare skill. Surprisingly often, SVG is treated as just another image format. We use SVG because of its scalability and smaller file size, but in reality, SVG is so much more!","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.taterboy.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/#breadcrumblist"},"author":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"creator":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/ellipse.png?fit=400%2C300&ssl=1","@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/#mainImage","width":400,"height":300},"primaryImageOfPage":{"@id":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/#mainImage"},"datePublished":"2019-05-04T04:19:56-07:00","dateModified":"2019-05-04T04:19:56-07:00"},{"@type":"WebSite","@id":"https:\/\/www.taterboy.com\/blog\/#website","url":"https:\/\/www.taterboy.com\/blog\/","name":"Design for Immersive Technologies","description":"User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.taterboy.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Design for Immersive Technologies | User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","og:type":"article","og:title":"A Practical Guide To SVG And Design Tools | Design for Immersive Technologies","og:description":"A Practical Guide To SVG And Design ToolsA Practical Guide To SVG And Design Tools Miko?aj Dobrucki 2019-05-03T14:00:59+02:002019-05-04T11:04:19+00:00A good understanding of SVG is a rare skill. Surprisingly often, SVG is treated as just another image format. We use SVG because of its scalability and smaller file size, but in reality, SVG is so much more!","og:url":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/","article:published_time":"2019-05-04T11:19:56+00:00","article:modified_time":"2019-05-04T11:19:56+00:00","twitter:card":"summary","twitter:title":"A Practical Guide To SVG And Design Tools | Design for Immersive Technologies","twitter:description":"A Practical Guide To SVG And Design ToolsA Practical Guide To SVG And Design Tools Miko?aj Dobrucki 2019-05-03T14:00:59+02:002019-05-04T11:04:19+00:00A good understanding of SVG is a rare skill. Surprisingly often, SVG is treated as just another image format. We use SVG because of its scalability and smaller file size, but in reality, SVG is so much more!"},"aioseo_meta_data":{"post_id":"64629","title":null,"description":null,"keywords":null,"keyphrases":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_custom_image_width":null,"og_custom_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"created":"2021-02-07 20:27:30","updated":"2026-09-01 09:59:05","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"twitter_image_url":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.taterboy.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/\" title=\"User Experience\">User Experience<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tA Practical Guide To SVG And Design Tools\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.taterboy.com\/blog"},{"label":"User Experience","link":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/"},{"label":"A Practical Guide To SVG And Design Tools","link":"https:\/\/www.taterboy.com\/blog\/2019\/05\/a-practical-guide-to-svg-and-design-tools\/"}],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8wzr5-gOp","jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/05\/ellipse.png?fit=400%2C300&ssl=1","_links":{"self":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts\/64629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/comments?post=64629"}],"version-history":[{"count":0,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts\/64629\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/media\/64630"}],"wp:attachment":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/media?parent=64629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/categories?post=64629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/tags?post=64629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}