<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Max Houston Oppenheimer</title>
    <description>The latest articles on DEV Community by Max Houston Oppenheimer (@oppnheimer).</description>
    <link>https://dev.to/oppnheimer</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F105627%2F4aaa1549-d381-460f-927b-bf83bcfd9cda.jpg</url>
      <title>DEV Community: Max Houston Oppenheimer</title>
      <link>https://dev.to/oppnheimer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/oppnheimer"/>
    <language>en</language>
    <item>
      <title>Freelance Software Consulting Contract [TEMPLATE]</title>
      <dc:creator>Max Houston Oppenheimer</dc:creator>
      <pubDate>Tue, 07 Jan 2020 18:34:56 +0000</pubDate>
      <link>https://dev.to/oppnheimer/freelance-software-consulting-contract-template-3cg1</link>
      <guid>https://dev.to/oppnheimer/freelance-software-consulting-contract-template-3cg1</guid>
      <description>&lt;p&gt;The first major hurdle to signing my first customer was drafting a consulting agreement that fit my needs. The few free templates available online either felt too restrictive for the developer or didn't seem robust enough to offer real assurance for either party.&lt;/p&gt;

&lt;p&gt;Below is a template version of the agreement I use with freelance customers. It is a 30 day agreement that automatically renews.&lt;br&gt;
&lt;a href="https://docs.google.com/document/d/1he7H0W6vSkoTqbrEHCcvNrfK7ZHwVlx43vrrqitdvts/edit?usp=sharing"&gt;Custom Software Consulting Agreement [template]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some features of this contract include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;terms of payment

&lt;ul&gt;
&lt;li&gt;invoicing on the 1st and 15th&lt;/li&gt;
&lt;li&gt;expected payment within 15 days of invoice&lt;/li&gt;
&lt;li&gt;expectations about invoice disputes&lt;/li&gt;
&lt;li&gt;late fees&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;expectations about acceptance testing&lt;/li&gt;
&lt;li&gt;limited liability for developer&lt;/li&gt;
&lt;li&gt;terms of termination&lt;/li&gt;
&lt;li&gt;use of software for reference in personal sales and marketing&lt;/li&gt;
&lt;li&gt;protections for customer

&lt;ul&gt;
&lt;li&gt;ownership of software&lt;/li&gt;
&lt;li&gt;intellectual property&lt;/li&gt;
&lt;li&gt;confidentiality&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please download and modify to meet your needs and feel free to suggest edits or comment in the google doc :)&lt;/p&gt;

</description>
      <category>software</category>
      <category>contract</category>
      <category>freelance</category>
      <category>template</category>
    </item>
    <item>
      <title>You Too Can Animate: SVG Line Animation</title>
      <dc:creator>Max Houston Oppenheimer</dc:creator>
      <pubDate>Tue, 02 Oct 2018 16:54:27 +0000</pubDate>
      <link>https://dev.to/oppnheimer/you-too-can-animate-svg-line-animation-jgm</link>
      <guid>https://dev.to/oppnheimer/you-too-can-animate-svg-line-animation-jgm</guid>
      <description>&lt;p&gt;Animations are pleasing to look at and bolster the usability of an application. Animations can provide important feedback and make users more patient. Animation makes interacting with a technology more fun and visually pleasing yet all too often, sites are static and feel inhuman. The focus of this post is not to make a case for adding animation to your next project, but to demonstrate how little the cost of doing so can be. Delighting your users might be easier than you think!&lt;/p&gt;

&lt;p&gt;In this tutorial, you will create a custom SVG line-drawing and animate it with CSS keyframe animations.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you will need:
&lt;/h2&gt;

&lt;p&gt;This tutorial uses three free web-based tools and requires no prior web-development, animation, or graphics editing experience.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;DISCLAIMER: It is highly suggested to follow this tutorial using &lt;a href="https://www.google.com/chrome/" rel="noopener noreferrer"&gt;Google Chrome&lt;/a&gt;, &lt;a href="https://www.mozilla.org/en-US/firefox/new/" rel="noopener noreferrer"&gt;Firefox&lt;/a&gt;, or Microsoft Edge.&lt;/strong&gt; Vectr and CodePen may not work reliably on Safari or Internet Explorer.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Vectr
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://vectr.com/" rel="noopener noreferrer"&gt;Vectr&lt;/a&gt; is an online vector graphics editor. It is free and has intuitive tools for drawing and exporting SVGs.&lt;/p&gt;

&lt;h3&gt;
  
  
  SVGOMG
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://jakearchibald.github.io/svgomg/" rel="noopener noreferrer"&gt;SVGOMG&lt;/a&gt; is another free tool that takes an SVG file and strips away unnecessary code. This reduces the file size and eliminates code that may be distracting.&lt;/p&gt;

&lt;h3&gt;
  
  
  CodePen
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://codepen.io/" rel="noopener noreferrer"&gt;CodePen&lt;/a&gt; is an online community and editor for writing and showcasing code. It is perfect for small animations. You can write code and see changes in real-time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are SVGs?
&lt;/h2&gt;

&lt;p&gt;SVGs or Scalable Vector Graphics are super. They are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;vector images meaning they scale to any size without concern for resolution&lt;/li&gt;
&lt;li&gt;supported by all modern web browsers&lt;/li&gt;
&lt;li&gt;defined in XML which is a markup language that can be used within an HTML file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In essence, an SVG file creates an image using xy-coordinates or "points". These points are grouped into “paths” which describe lines or shapes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1b5ja751j6tieakgy5gu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1b5ja751j6tieakgy5gu.png" alt="incomplete triangle" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The path to describe the above triangle could look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;    &lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"M0 0 L100 0 L50 100 L5 10"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Don't fret, you will never need to write SVG paths by hand.&lt;/strong&gt; However, notice the number pairs following each &lt;code&gt;M&lt;/code&gt; and &lt;code&gt;L&lt;/code&gt;. These are x y coordinates marking each of the triangle's points along the path. Unlike raster image formats like JPEGs and PNGs, you won't see the pixels in enlarged SVGs. Increasing the image size simply increases the distance between points. No matter the size, SVG paths are filled smoothly.&lt;/p&gt;

&lt;p&gt;In this tutorial you will create an SVG with a single path. However, SVGs often contain many paths to describe more complex images.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create your SVG
&lt;/h2&gt;

&lt;p&gt;Head to &lt;a href="https://vectr.com/" rel="noopener noreferrer"&gt;Vectr.com&lt;/a&gt; and click the 'Use Online' button to launch the web-based editor. No registration required! It will look something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7bkm6q9kraa1jqr6zdyg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7bkm6q9kraa1jqr6zdyg.png" alt="blank vectr editor" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the top left you can see the 'Layers' tab. If you are new to this type of software, you can think of layers as a stack of transparent sheets. Each layer can be edited individually without impacting the others. You will see a new layer in this column when you add a reference image and again when drawing a path.&lt;/p&gt;

&lt;p&gt;Moving down, you will notice the pen tool. The pen tool creates a path by connecting points in a line. This is the tool used in this tutorial. The other tools create shapes or text which can also be exported as SVGs and animated.&lt;/p&gt;

&lt;p&gt;Lower still is the upload image button.&lt;/p&gt;

&lt;p&gt;Finally, once finished, you will export your SVG using the export button at the top of the right-side column.&lt;/p&gt;

&lt;h3&gt;
  
  
  Upload an Image
&lt;/h3&gt;

&lt;p&gt;Choose a reference image from your computer or find one online and download it. Keep it simple. Images with clear lines or high-contrast are best. It is difficult and tedious to express fine detail when drawing by hand. Use the upload button or drag-and-drop. Once uploaded, you will see an 'image' layer in the left column. Resize your image to fit the page by dragging any corner (&lt;strong&gt;tip: hold shift to maintain the image's original aspect ratio&lt;/strong&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy2516m4v7fbzyrktn8jo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy2516m4v7fbzyrktn8jo.png" alt="vectr with image" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Sketch Your Path
&lt;/h3&gt;

&lt;p&gt;Sketch. Meaning do this step quickly and loosely. It is easy to add, remove, and tweak points along your path later. A rough path at this stage allows you to experiment and make changes quickly. Click the pen tool then click any location on your image to start a path. Each following click adds a new point and extends your path.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0l2j6tio991gsbm6nw8x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0l2j6tio991gsbm6nw8x.png" alt="vectr with started path" width="674" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Continue adding points along the major lines of your reference image. It may take a few tries to capture your image with a single path. The delete key will remove the last point in your path. You can also drag existing points if you need to reposition. Depending on the image and your preference, you may choose to connect the beginning and end of your path to form a closed loop.&lt;/p&gt;

&lt;p&gt;You may want to hide the reference image to get a better idea of what your finished SVG will look like. Hover over your image layer and click the eye icon to toggle that layer's visibility.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzj82gmia6is2uuf2fs2w.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzj82gmia6is2uuf2fs2w.gif" alt="toggle image visibility gif" width="720" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Refine Your Path
&lt;/h3&gt;

&lt;p&gt;There are several basic ways to edit a path to better fit an image:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reposition a point - drag any existing point&lt;/li&gt;
&lt;li&gt;Add a new point - click anywhere along your existing path&lt;/li&gt;
&lt;li&gt;Remove a point - click any existing point to select it and then press the delete key&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvkn4qwxdo22mquc7d4h.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvkn4qwxdo22mquc7d4h.gif" alt="edit point demo" width="600" height="193"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You may have noticed small circles or "corner widgets" next to each point in your path. These widgets adjust the curvature of points. Drag the widget away from its point to soften the curve.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flg792pvsv6xzu8k6jhy1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flg792pvsv6xzu8k6jhy1.gif" alt="edit point demo 2" width="720" height="263"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Double clicking a point toggles between two methods for adjusting a curve. Play with both!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl301trfr2xv30j0fuf6i.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl301trfr2xv30j0fuf6i.gif" alt="edit point demo 3" width="400" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  A Few Tips
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Don't sweat the small stuff - illustration is about conveying more with less. It is impossible to capture every detail so be selective about which elements to express. Try removing points to simplify your path.&lt;/li&gt;
&lt;li&gt;You don't get points for realism - hide your reference image. Experiment with proportions and the intensity of curves to give your illustration style.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Export Your SVG
&lt;/h3&gt;

&lt;p&gt;Once satisfied with your path, it is time to export! First, click the path layer to select it for export. You do not want your reference image included in the exported file. You will see a grey rectangle surrounding only the path. Then click the export button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffw11set9mklwz1v6jhwo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffw11set9mklwz1v6jhwo.png" alt="pre export steps" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the export page, select 'selection' and double check that you &lt;strong&gt;do not&lt;/strong&gt; see your reference image behind your path. Then click download to save your SVG!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2wytdbkszuiisze48sna.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2wytdbkszuiisze48sna.png" alt="export page" width="800" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Clean Your SVG
&lt;/h2&gt;

&lt;p&gt;SVG cleaners do a few helpful things. Cleaners remove unnecessary code and expose nicely formatted XML code used in the next step.&lt;/p&gt;

&lt;p&gt;Navigate to &lt;a href="https://jakearchibald.github.io/svgomg/" rel="noopener noreferrer"&gt;SVGOMG&lt;/a&gt; and upload the SVG file downloaded from Vectr (it is likely in your downloads folder entitled 'untitled.svg')&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1b9v6ekjx2gmlo7vre6j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1b9v6ekjx2gmlo7vre6j.png" alt="blank SVGOMG" width="800" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After uploading, you will see a column of switches on the right hand side. Leave the default settings as-is and click the 'copy as text' button just below the paint bucket. You will paste this text in the next step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffa3s0prkc4g7ia6b7fvl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffa3s0prkc4g7ia6b7fvl.png" alt="SVG copy button" width="800" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Animate!
&lt;/h2&gt;

&lt;p&gt;Navigate to &lt;a href="https://codepen.io/" rel="noopener noreferrer"&gt;CodePen&lt;/a&gt; and create a new "Pen", an editor where you will write a little code to animate your SVG.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foz4wv9d1skqfhp8nk8nx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foz4wv9d1skqfhp8nk8nx.gif" alt="new code pen" width="640" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the new editor you will notice three text areas at the top with the headings 'HTML', 'CSS', and 'JS'. Hypertext Markup Language, Cascading Style Sheets, and JavaScript are standard languages used to create web pages and applications. HTML describes the content and structure of a webpage and CSS describes the style or presentation of that HTML. Ignore the JS section for this tutorial.&lt;/p&gt;

&lt;h3&gt;
  
  
  HTML
&lt;/h3&gt;

&lt;p&gt;Paste the SVG code copied from &lt;a href="https://jakearchibald.github.io/svgomg/" rel="noopener noreferrer"&gt;SVGOMG&lt;/a&gt; into the HTML area, this is the content you will animate with CSS. Your SVG will appear in the white area below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3kbgqxt30qnrtn1h0flt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3kbgqxt30qnrtn1h0flt.png" alt="code pen with HTML" width="800" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do not&lt;/strong&gt; edit this HTML code but notice its structure. At the top and bottom you can see &lt;code&gt;&amp;lt;svg [don't worry about the junk in here]&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/svg&amp;gt;&lt;/code&gt;. These are called "open" and "close tags". They denote the beginning and end of an HTML element, in this case, an SVG. HTML elements can be nested, meaning they can contain other elements. Everything between the open and close SVG tags are parts of your SVG. You should recognize the enclosed &lt;code&gt;path&lt;/code&gt; tag. The path tag looks a little bit different &lt;code&gt;&amp;lt;path d="[your path coordinates]" /&amp;gt;&lt;/code&gt;.  It does not contain any other HTML elements, so it is "self closing".&lt;/p&gt;

&lt;h3&gt;
  
  
  CSS
&lt;/h3&gt;

&lt;p&gt;Now you can use CSS to describe the &lt;code&gt;svg&lt;/code&gt; and &lt;code&gt;path&lt;/code&gt; HTML elements. CSS code follows the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;selector&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;property&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;selector&lt;/code&gt; is an HTML element to be targeted. A &lt;code&gt;property&lt;/code&gt; is a quality of the element that can be modified, and a &lt;code&gt;value&lt;/code&gt; specifies how that quality should look or behave. A CSS document can have many selectors and selectors can have many property/value pairs. To demonstrate, paste the following code into the CodePen CSS area.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vw&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;BurlyWood&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;svg&lt;/code&gt; CSS selector targets the entire &lt;code&gt;svg&lt;/code&gt; HTML element. The height and width of your SVG should have changed to fill the entire window below your code. The values &lt;code&gt;100vh&lt;/code&gt; and &lt;code&gt;100vw&lt;/code&gt; specify that the SVG's height and width should be 100% of the view height and view width respectively. If you resize the display area or your browser window, the SVG will resize to match. A height of &lt;code&gt;50vh&lt;/code&gt; would specify half of the window's height. Your SVG also has a fun new background color! You can choose your own from a &lt;a href="https://css-tricks.com/snippets/css/named-colors-and-hex-equivalents/" rel="noopener noreferrer"&gt;complete list of named CSS colors&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Next, target the &lt;code&gt;path&lt;/code&gt; element. On a new line, paste the following code after the &lt;code&gt;svg&lt;/code&gt; selector's closing bracket ( &lt;code&gt;}&lt;/code&gt; ) :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;stroke-dasharray&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A "stroke" is the line that follows a path. Until now, the path has been drawn with a solid stroke, meaning a single continuous line. The &lt;code&gt;stroke-dasharray&lt;/code&gt; property makes a stroke dashed and its value specifies the length of each dash.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg8agnia70p93d0pykod6.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg8agnia70p93d0pykod6.gif" alt="path with dash array" width="720" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, define the animation. Paste the following keyframe definition on a new line in the CSS area. You will not see any change to the SVG just yet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;draw&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nt"&gt;from&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;stroke-dashoffset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nt"&gt;to&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;stroke-dashoffset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;@keyframes&lt;/code&gt; is an "at-rule" or a CSS keyword that describes a behavior. This one describes steps in an animation. The following word, 'draw', is the name and is used later to reference this animation. You can name the animation anything you like. &lt;code&gt;from&lt;/code&gt; and &lt;code&gt;to&lt;/code&gt; are keyframe selectors to specify what the animation will look like at its beginning and end.&lt;/p&gt;

&lt;p&gt;This keyframe definition describes a gradual change in the &lt;code&gt;stroke-dashoffset&lt;/code&gt; property. It specifies start and end values; CSS keyframes can fill in the rest. The &lt;code&gt;stroke-dashoffset&lt;/code&gt; property describes where along the path the stroke starts. Its value specifies the distance from the beginning of the path. By animating the &lt;code&gt;stroke-dashoffset&lt;/code&gt; property, you essentially push the stroke along the path over the course of the animation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fto2wepthhukattrivylo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fto2wepthhukattrivylo.gif" alt="stroke dashoffset example" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, it is time to apply the animation. Add &lt;code&gt;animation: draw 2s infinite&lt;/code&gt; inside your &lt;code&gt;path&lt;/code&gt; css selector. The animation property can take several values. This example receives &lt;code&gt;draw&lt;/code&gt; the name of the keyframe animation, &lt;code&gt;2s&lt;/code&gt; the duration of the animation in seconds, and &lt;code&gt;infinite&lt;/code&gt; a keyword specifying that the animation should repeat indefinitely. Your complete CSS should look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vw&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;stroke-dasharray&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;draw&lt;/span&gt; &lt;span class="m"&gt;2s&lt;/span&gt; &lt;span class="n"&gt;infinite&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;draw&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nt"&gt;from&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;stroke-dashoffset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nt"&gt;to&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;stroke-dashoffset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once your SVG is in motion, experiment with the &lt;code&gt;stroke-dasharray&lt;/code&gt;, and &lt;code&gt;stroke-dashoffset&lt;/code&gt; values to find a dash length that suits your image. For a smooth animation, ensure your 'to' &lt;code&gt;stroke-dashoffset&lt;/code&gt; value is a multiple of the &lt;code&gt;stroke-dasharray&lt;/code&gt; value (at least double).&lt;/p&gt;

&lt;p&gt;All of the CSS properties used in this tutorial can take a variety of values. Combinations of which can change the effect of your animation greatly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzspbka9v56bxfm2zq14u.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzspbka9v56bxfm2zq14u.gif" alt="pear examples" width="800" height="283"&gt;&lt;/a&gt;&lt;br&gt;
Check out the code for this example on &lt;a href="https://codepen.io/OppNHeimer/pen/EeBzMw" rel="noopener noreferrer"&gt;CodePen&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;In particular, read into &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/animation" rel="noopener noreferrer"&gt;animation&lt;/a&gt;, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray" rel="noopener noreferrer"&gt;stroke-dasharray&lt;/a&gt;, and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes" rel="noopener noreferrer"&gt;@keyframes&lt;/a&gt; to customize your animation further. There are also many other &lt;a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute" rel="noopener noreferrer"&gt;CSS properties that can be applied to SVGs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you have the tools to build an animated SVG line drawing. Add a little motion to your next project!&lt;/p&gt;

</description>
      <category>svg</category>
      <category>animation</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
