<?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: John Dope</title>
    <description>The latest articles on DEV Community by John Dope (@johntheo).</description>
    <link>https://dev.to/johntheo</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%2F709176%2F732abdff-163b-46e8-8207-738fa250f253.jpeg</url>
      <title>DEV Community: John Dope</title>
      <link>https://dev.to/johntheo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/johntheo"/>
    <language>en</language>
    <item>
      <title>Lazy Loading SVG Icons using Web Components</title>
      <dc:creator>John Dope</dc:creator>
      <pubDate>Sun, 19 Sep 2021 22:15:27 +0000</pubDate>
      <link>https://dev.to/johntheo/lazy-loading-svg-icons-using-web-components-3foi</link>
      <guid>https://dev.to/johntheo/lazy-loading-svg-icons-using-web-components-3foi</guid>
      <description>&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/john-theo/embed/LYLddpd?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Icons can be a &lt;strong&gt;real pain in the ass&lt;/strong&gt;, and for good reasons.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dilemma
&lt;/h2&gt;

&lt;p&gt;For developer whose desired icon isn't be included in the component library he/she is using, normally he/she has three options:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use a similar icon (and look away from the not-so-perfect creature);&lt;/li&gt;
&lt;li&gt;Download a SVG from a SVG icon library like &lt;a href="https://www.flaticon.com/packs/library" rel="noopener noreferrer"&gt;FlatIcon&lt;/a&gt; and put it into the page (but the whole process may give you a headache);&lt;/li&gt;
&lt;li&gt;Bring another set of icon font into the project.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But wait! That icon does not resemble it's neighbors! Too much padding, different color, even the stroke width looks strange.&lt;/p&gt;

&lt;h2&gt;
  
  
  SVG Icons
&lt;/h2&gt;

&lt;p&gt;Icons, whatever format they exist in the websites, are mostly originated from SVG files. Using SVGs as icons are no new topic, but icon fonts still seem to be the major trend. &lt;a href="https://fontawesome.com/" rel="noopener noreferrer"&gt;Font Awesome&lt;/a&gt;, &lt;a href="https://fonts.google.com/icons" rel="noopener noreferrer"&gt;Google Font Icons&lt;/a&gt; and many others are taking this approach.&lt;/p&gt;

&lt;p&gt;There are many articles discussed about &lt;code&gt;SVG icons&lt;/code&gt; vs &lt;code&gt;icon fonts&lt;/code&gt;, like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.creativebloq.com/web-design/icon-fonts-vs-svg-101413211" rel="noopener noreferrer"&gt;Icon fonts vs SVG - which is the best option?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://betterprogramming.pub/inline-svg-or-icon-fonts-which-one-to-use-77c0daf1c527" rel="noopener noreferrer"&gt;Inline SVG or Icon Fonts: Which One to Use&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://css-tricks.com/icon-fonts-vs-svg/" rel="noopener noreferrer"&gt;Inline SVG vs Icon Fonts [CAGEMATCH]&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.lambdatest.com/blog/its-2019-lets-end-the-debate-on-icon-fonts-vs-svg-icons/" rel="noopener noreferrer"&gt;Icon Fonts vs SVG – Clash of the Icons&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To summarize, the major pros and cons of SVG icons (compared to icon fonts) are:&lt;/p&gt;

&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Sharp in retina display (icon fonts are often anti-aliased)&lt;/li&gt;
&lt;li&gt;Easy positioning (icon fonts use pseudo elements)&lt;/li&gt;
&lt;li&gt;Can be multichromatic even be animated&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi2.wp.com%2Fcss-tricks.com%2Fwp-content%2Fuploads%2F2014%2F04%2Fsvg-font.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi2.wp.com%2Fcss-tricks.com%2Fwp-content%2Fuploads%2F2014%2F04%2Fsvg-font.png" alt="SVG fonts won't be anti-aliased"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This image is originally published &lt;a href="https://css-tricks.com/icon-fonts-vs-svg/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Not easy to cache (See &lt;a href="(https://betterprogramming.pub/inline-svg-or-icon-fonts-which-one-to-use-77c0daf1c527#b912)"&gt;this section&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Lack of (ancient IE verisons) compatibility&lt;/li&gt;
&lt;li&gt;Brings a lot of elements into the DOM tree&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's not hard to see that the pros of SVG icons are truly critical to make user experience superb, while the cons are, well, they can be dealt with in most cases.&lt;/p&gt;

&lt;p&gt;So, why is icon fonts so popular?&lt;/p&gt;

&lt;h2&gt;
  
  
  A11y is &lt;code&gt;!important&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The most apparent benefit of using icon fonts maybe because it's ease to use. One &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag and you are good to go. However when using SVGs as icons, you need to prepare a bunch of SVG files in the public folder (or insert them directly into html as inline SVGs), creating numerous &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; tag in the page, deal with the icon sizes, paddings and other stuff. Even before you know it, you typed "Font Awesome" in the search bar.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;

&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://fonts.googleapis.com/css?family=Material+Icons"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"material-icons-outlined"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;So is there a way to make SVG icons as accessible as icon fonts?&lt;/p&gt;

&lt;h2&gt;
  
  
  A Project of SVG Icons
&lt;/h2&gt;

&lt;p&gt;I was coding a leisure project &lt;a href="https://github.com/John-Theo/Tooolbar" rel="noopener noreferrer"&gt;Tooolbar&lt;/a&gt;, which requires to use a bunch of icons. The aim of the project is to generate a nice-looking toolbar painlessly with several lines of JSON. I want to give the users full control of what icons they choose to put in the toolbar, and I don't want the project to be icon-library-dependent. So it leaves me no choice but to use SVG as icons. (Yes, I can use PNGs and JPGs, but even my granpa won't consider it :)&lt;/p&gt;

&lt;p&gt;During the develop, I learned amazingly how customizable can a SVG be. Knowing it's size can be easily changed, I learned that if one give the value of "currentColor" to the &lt;code&gt;stroke&lt;/code&gt; or &lt;code&gt;fill&lt;/code&gt; attribute of a &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt;, the color of the &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt; will inherit from it's ancestor. And great thanks to &lt;a href="https://akaricons.com/" rel="noopener noreferrer"&gt;AkarIcons&lt;/a&gt;, I learned that the &lt;code&gt;stroke-width&lt;/code&gt; and even &lt;code&gt;stroke-linecap&lt;/code&gt; and &lt;code&gt;stroke-linejoin&lt;/code&gt; property can be controlled by css.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method Matters
&lt;/h3&gt;

&lt;p&gt;To place an SVG into the html document, there are several ways:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Use the &lt;code&gt;img&lt;/code&gt; tag
&lt;/h4&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;

&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"foo.svg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"bar"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  2. Use SVG as CSS background
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;

&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url(foo.svg)&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;h4&gt;
  
  
  3. Use the &lt;code&gt;&amp;lt;object&amp;gt;&lt;/code&gt; tag
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;

&lt;span class="nt"&gt;&amp;lt;object&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"image/svg+xml"&lt;/span&gt; &lt;span class="na"&gt;data=&lt;/span&gt;&lt;span class="s"&gt;"foo.svg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- fallback --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/object&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- or --&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;object&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"image/svg+xml"&lt;/span&gt; &lt;span class="na"&gt;data=&lt;/span&gt;&lt;span class="s"&gt;"data:image/svg+xml;base64,[data]"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- fallback --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/object&amp;gt;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  4. Use static inline SVG
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;

&lt;span class="nt"&gt;&amp;lt;svg&amp;gt;&lt;/span&gt; ... &lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  5. Leveraging the &lt;code&gt;&amp;lt;use&amp;gt;&lt;/code&gt; tag
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;The &lt;a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use" rel="noopener noreferrer"&gt;&lt;code&gt;&amp;lt;use&amp;gt;&lt;/code&gt;&lt;/a&gt; tag can be used to refer an external SVG (similar to the &lt;code&gt;src&lt;/code&gt; attribute in the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;

&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 100 100"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;use&lt;/span&gt; &lt;span class="na"&gt;xlink:href=&lt;/span&gt;&lt;span class="s"&gt;"foo.svg#bar"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/use&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
  
  
  6. Insert SVG content as innerHTML by js
&lt;/h4&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;foo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;foo&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;svg&amp;gt; ... &amp;lt;/svg&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The problem of the first three approaches is that you don’t get to control the innards of the SVG with CSS at all. Using the &lt;code&gt;&amp;lt;use&amp;gt;&lt;/code&gt; tag allows outer &lt;code&gt;color&lt;/code&gt; css property to be inherited by the elements with "currentColor" in the SVG content, but due to the whole &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; is wrapped in a "shadow root", SVG &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt;s ignore any other css property such as "stroke-linecap" or "stroke-width", etc. And it requires the root &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; tag of the external file to have an &lt;code&gt;id&lt;/code&gt; attribute, which is rather hard to meet in common SVGs downloaded from the web.&lt;/p&gt;

&lt;p&gt;So in short, inline SVG is the best and only choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Web Component has to Offer
&lt;/h2&gt;

&lt;p&gt;I didn't intend to use any framework to build &lt;a href="https://github.com/John-Theo/Tooolbar" rel="noopener noreferrer"&gt;Tooolbar&lt;/a&gt;. But during my development, I found my code to be very much alike a component, be it React Component, Vue Component or Web Component. It takes properties, emits events, can be nested, and takes care of the content inside it's root element.&lt;/p&gt;

&lt;p&gt;Another thing I noticed during developing &lt;a href="https://github.com/John-Theo/Tooolbar" rel="noopener noreferrer"&gt;Tooolbar&lt;/a&gt; is that if I can render some nested HTML using nested JSON full of key-value pairs, why don't write some semantic html tag directly?&lt;/p&gt;

&lt;p&gt;So how about refactoring the whole project using some kind of compoent? I made a call with &lt;a class="mentioned-user" href="https://dev.to/awmleer"&gt;@awmleer&lt;/a&gt;, described the idea to him, he said he has been watching &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components" rel="noopener noreferrer"&gt;Web Components&lt;/a&gt; for a while and is willing to try &lt;a href="https://stenciljs.com/" rel="noopener noreferrer"&gt;StencilJS&lt;/a&gt;, a web component framework.&lt;/p&gt;

&lt;p&gt;Web Components technology features a wide variety of characteristics aligned perfectly with my needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Natively supported custom HTML tag;&lt;/li&gt;
&lt;li&gt;Framework independent, vanilla js and css can be used;&lt;/li&gt;
&lt;li&gt;CSS within the namespace, everything inside the "shadow root" play their own game;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;template&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;slot&amp;gt;&lt;/code&gt; tags are a perfect solution to the nested structure.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;React or Vue.js or many other frontend frameworks can do most of the jobs, but I am a lazy man, I only want to write my code once and hope it can be used in anywhere. And I'm so lazy that I don't want to write any wrappers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing Icons Made with Web Components
&lt;/h2&gt;

&lt;p&gt;With pains and gains in mind, only several hours after the first phone call, &lt;a href="https://www.npmjs.com/package/akar-icons-web-components" rel="noopener noreferrer"&gt;here&lt;/a&gt; are the final result.&lt;/p&gt;

&lt;p&gt;So what did we do?&lt;/p&gt;

&lt;h3&gt;
  
  
  Size
&lt;/h3&gt;

&lt;p&gt;After bundling, the &lt;code&gt;index.js&lt;/code&gt; with its loader included is only &lt;strong&gt;~4KB&lt;/strong&gt; gzipped, every icon is lazy-loaded and only adds &lt;strong&gt;~0.6KB&lt;/strong&gt; to the traffic. So for a normal page with ~10 icons, &lt;a href="https://www.npmjs.com/package/akar-icons-web-components" rel="noopener noreferrer"&gt;akar-icon-web-components&lt;/a&gt; loads only &lt;strong&gt;~10KB&lt;/strong&gt; of data, compared to the original &lt;a href="https://unpkg.com/akar-icons-fonts@1.0.8/src/fonts/akar-icons.svg" rel="noopener noreferrer"&gt;integrated SVG of AkarIcons&lt;/a&gt; &lt;strong&gt;~200KB&lt;/strong&gt; gzipped.&lt;/p&gt;

&lt;h3&gt;
  
  
  Accessibility
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;

&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://unpkg.com/akar-icons-web-components"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"module"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;akar-icon&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"bicycle"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;/akar-icon&amp;gt;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;With one line of &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; import, you can now have any beautiful AkarIcon on your page. No &lt;code&gt;&amp;lt;i&amp;gt;&lt;/code&gt;, no &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;, but &lt;code&gt;&amp;lt;akar-icon&amp;gt;&lt;/code&gt;, and it's supported natively in the browser. Furthermore, you can put it inside of your React or Vuejs project, it  still works perfectly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cahce
&lt;/h3&gt;

&lt;p&gt;One of the cons metioned with SVG icons is it's not cached perfectly. In &lt;a href="https://www.npmjs.com/package/akar-icons-web-components" rel="noopener noreferrer"&gt;akar-icon-web-components&lt;/a&gt;, SVGs are loaded using &lt;code&gt;fetch&lt;/code&gt; from the original &lt;a href="https://github.com/artcoholic/akar-icons-app/tree/main/src/svg" rel="noopener noreferrer"&gt;AkarIcons github repo&lt;/a&gt;. We use a simple map object to keep track of whether an icon has been fetched or not, so the same icon won't be fetched twice in the same page load process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Customization
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/akar-icons-web-components" rel="noopener noreferrer"&gt;akar-icon-web-components&lt;/a&gt; further extended the customization capability of &lt;a href="https://akaricons.com/" rel="noopener noreferrer"&gt;AkarIcons&lt;/a&gt;, making all following attributes customizable:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Attribute&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Css Var&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;24&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;color&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;color&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;"inherit"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;stroke&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--stroke&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cap&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;enum&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--cap&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;"round"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;join&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;enum&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--join&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;"round"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fm69k7ucfqg6vo7er7wdv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fm69k7ucfqg6vo7er7wdv.gif" alt="Banner GIF"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Everything Said
&lt;/h2&gt;

&lt;p&gt;Finally, huge thanks to &lt;a href="https://akaricons.com/" rel="noopener noreferrer"&gt;AkarIcons&lt;/a&gt;, this project won't come to life without you. And hope you enjoyed reading this article!&lt;/p&gt;

</description>
      <category>codepen</category>
      <category>webcomponents</category>
      <category>icon</category>
      <category>svg</category>
    </item>
  </channel>
</rss>
