<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Elly Pirelly on Medium]]></title>
        <description><![CDATA[Stories by Elly Pirelly on Medium]]></description>
        <link>https://medium.com/@elly-pirelly?source=rss-1ca393a1b0c3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qGLXvlyNalZMkdHaIdAm6w.jpeg</url>
            <title>Stories by Elly Pirelly on Medium</title>
            <link>https://medium.com/@elly-pirelly?source=rss-1ca393a1b0c3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 07:46:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@elly-pirelly/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Create the perfect toggle switch with pure HTML / CSS, no JavaScript necessary]]></title>
            <link>https://elly-pirelly.medium.com/create-the-perfect-toggle-switch-with-pure-html-css-no-javascript-necessary-7889adf04b69?source=rss-1ca393a1b0c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7889adf04b69</guid>
            <category><![CDATA[better-programming]]></category>
            <category><![CDATA[html-css]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[frontend-development]]></category>
            <dc:creator><![CDATA[Elly Pirelly]]></dc:creator>
            <pubDate>Tue, 16 Mar 2021 08:40:41 GMT</pubDate>
            <atom:updated>2021-03-29T08:03:54.701Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="screenshot of a toggle switch on codepen" src="https://cdn-images-1.medium.com/max/1024/1*PvwscIb-sJDi7dWArzuEVQ.jpeg" /></figure><h4>Based on input element type checkbox, styled with CSS pseudo-elements ::before and ::after and pseudo-class :checked</h4><h3>Goal</h3><p>This is the toggle switch that will be created:</p><figure><img alt="animated toggle switch" src="https://cdn-images-1.medium.com/max/748/1*uxI1mW_w1w2mq-Rsd4L2XQ.gif" /></figure><ul><li>an elliptical toggle switch in pure HTML and CSS (no JavaScript necessary)</li><li>when toggled (click): change of color <strong>and</strong> text content</li><li>based on/use of the HTML element &lt;input type=&quot;checkbox&quot;&gt; , here, modification through CSS styling, also known as “checkbox hack”</li><li>a bigger hit area through the use of the associated HTML element &lt;label&gt; which enables toggling the switch while clicking the text <strong>next</strong> to it— not only the tiny little toggle switch itself— this makes it easier to toggle between options</li></ul><h3>Precondition</h3><p>The HTML element &lt;input type=&quot;checkbox&quot;&gt; brings the desired behavior out of the box — it is rendered by default as a box that is checked or unchecked when clicked/ticked. The default appearance of the HTML element &lt;input type=&quot;checkbox&quot;&gt; depends on the browser, see the default appearance for a checkbox in Chrome below. While styling our toggle switch, these default stylings will be overwritten.</p><figure><img alt="&lt;input type=”checkbox”&gt; with :focus and :active state and :checked attribute for the first checkbox" src="https://cdn-images-1.medium.com/max/964/1*mJSlvaEZ42VBtYYeKFk1Ng.png" /><figcaption>&lt;input type=&quot;checkbox&quot;&gt; with :focus and :active state and :checked attribute for the first checkbox</figcaption></figure><p>The pseudo-class :checked allows to turn a single value on and off. Present as an attribute within HTML element &lt;input type=&quot;checkbox&quot; checked&gt; the checkbox is toggled on by default. For our toggle switch, the :checked won’t be present within the HTML but will be used as pseudo-class within the CSS.</p><p>Read more about the HTML element <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox">input type checkbox on MDN Web Docs</a></p><h3>Not into reading further?</h3><p>See final CodePen here:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Fellypirelly%2Fembed%2Fpreview%2FBapzgdK%3Fheight%3D600%26slug-hash%3DBapzgdK%26default-tabs%3Dcss%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Fellypirelly%2Fpen%2FBapzgdK&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/66e39e534791a056af0ea5f6549ab757/href">https://medium.com/media/66e39e534791a056af0ea5f6549ab757/href</a></iframe><h3>The HTML</h3><pre>&lt;div class=&quot;toggle-checkbox-wrapper&quot;&gt;<br>  &lt;input class=&quot;toggle-checkbox&quot; type=&quot;checkbox&quot; id=&quot;toggle&quot;&gt;<br>  &lt;label class=&quot;slider&quot; for=&quot;toggle&quot;&gt;<br>    &lt;span class=&quot;toggle-switch opt1&quot;&gt;Look, I&#39;m blue!&lt;/span&gt;<br>    &lt;span class=&quot;toggle-switch opt2&quot;&gt;Look, I&#39;m brown!&lt;/span&gt;<br>  &lt;/label&gt;<br>&lt;/div&gt;</pre><ul><li>the outer &lt;div&gt; element is used to wrap the &lt;input&gt; element and &lt;label&gt; element — it’s nicer to have all of the toggle switch in a dedicated container</li><li>the &lt;input&gt; element needs to have the id attribute to make the toggle switch work</li><li>the &lt;label&gt; element needs to have the for attribute to make the toggle switch work</li><li>the id attribute and the for attribute both need to have the same value, this “connects” the &lt;input&gt; element to the &lt;label&gt; element</li><li>the &lt;label&gt; element must appear <strong>after</strong> the &lt;input&gt; element</li><li>two &lt;span&gt; elements are needed, as there will be two texts to toggle between</li><li>clicking on the &lt;label&gt; element generally enables a bigger hit area, in our case the size of this hit area depends on the length of the text within the &lt;span&gt;(s)</li></ul><h3>The CSS</h3><pre>* {<br>  box-sizing: border-box;<br>  margin: 0;<br>  padding: 0;<br>}</pre><pre>body {<br>  background-color: #F5DEB3;<br>  color: #282828;<br>  font-family: arial, helvetica, sans-serif;<br>  font-size: 16px;<br>  font-weight: 700;<br>  padding: 24px;<br>}</pre><pre>.toggle-checkbox-wrapper {<br>  background-color: #fff;<br>  padding: 24px;<br>}</pre><ul><li>reset * is set to get the usual box-sizing, margin and padding issues out of the way</li><li>body sets very general stylings and the font</li><li>.toggle-checkbox-wrapper is the outer &lt;div&gt; element styling, just minimal styling not necessary for the toggle switch itself</li></ul><p><strong>Styling on the </strong><strong>&lt;input&gt; element:</strong></p><pre>.toggle-checkbox {<br>  display: none;<br>}</pre><ul><li>.toggle-checkbox { display: none; } on the &lt;input&gt; element hides the default checkbox appearance, see Chrome example above</li></ul><p><strong>Styling on the </strong><strong>&lt;label&gt; element:</strong></p><pre>slider {<br>  position: relative;<br>}</pre><pre>/* ellipsis */<br>.slider::before {<br>  background: lightblue;<br>  border-radius: 34px;<br>  bottom: 0;<br>  content: &#39;&#39;;<br>  height: 24px;<br>  margin: auto;<br>  position: absolute;<br>  top: 0;<br>  width: 40px;<br>}</pre><pre>/* circle */<br>.slider::after {<br>  background: navy;<br>  border-radius: 50%;<br>  bottom: 0;<br>  content: &#39;&#39;;<br>  height: 16px;<br>  left: 4px;<br>  margin: auto;<br>  position: absolute;<br>  top: 0;<br>  transition: 0.4s;<br>  width: 16px;<br>}</pre><ul><li>.slider on the &lt;label&gt; element in a broader sense <strong>is</strong> the ellipsis but — <strong>important! </strong>— doesn’t get a lot of styling in our case</li><li>instead, the ellipsis and the circle will be created and styled via pseudo-element .slider::before for the ellipsis and pseudo-element .slider::after for the circle</li><li>the default for both, ellipsis and circle, is the blue version</li><li>in these pseudo-classes shared stylings that both the brown and the blue version use are put</li></ul><p><strong>Styling on the </strong><strong>&lt;span&gt; elements:</strong></p><pre>.toggle-switch {<br>  margin-left: 50px;<br>}</pre><pre>.toggle-switch.opt1 {<br>  color: navy;<br>}</pre><pre>.toggle-switch.opt2 {<br>  color: brown;<br>  display: none;<br>}</pre><ul><li>.toggle-switch on both &lt;span&gt;s has .margin-left: 50px; to distance the text from the ellipsis</li><li>.toggle-switch.opt1 on first &lt;span&gt; gets blue text color .color: navy;</li><li>.toggle-switch.opt2 on second&lt;span&gt; gets brown text color .color: brown; and display: none; to hide this &lt;span&gt;otherwise you would see both texts</li></ul><p><strong>Back to the </strong><strong>&lt;input&gt; element:</strong></p><pre>.toggle-checkbox:checked + .slider::before {<br>  background-color: lightsalmon;<br>}</pre><pre>.toggle-checkbox:checked + .slider::after {<br>  background-color: maroon;<br>  transform: translateX(16px);<br>}</pre><ul><li>.toggle-checkbox:checked + .slider::before will toggle the lightblue background-color of the ellipsis</li><li>.toggle-checkbox:checked + .slider::after will toggle the lightbrown background-color of the circle</li><li>transform: translateX(16px); will push the brown circle 16px to the right on the x axis</li></ul><pre>.toggle-checkbox:checked ~ .slider &gt; .toggle-switch.opt1 {<br>  display: none;<br>}</pre><pre>.toggle-checkbox:checked ~ .slider &gt; .toggle-switch.opt2 {<br>  display: inline-block;<br>}</pre><ul><li>display: none; will — on click — hide the blue version</li><li>display: inline-block; will — on click — display the brown version</li><li>and vice versa</li></ul><h3>Conclusion</h3><p>After wrapping my head around this and taking the time to dig into it I was honestly surprised how easy this is and how little code is needed to create a perfect toggle switch.</p><p>Actually, I’ve coded <a href="https://codepen.io/ellypirelly/pen/YzpYRdv">this in SCSS</a> which in my opinion makes it even easier to understand what’s happening.</p><p>Only need a very basic toggle switch? I got you covered, see here:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Fellypirelly%2Fembed%2Fpreview%2FjOqpRVZ%3Fheight%3D600%26slug-hash%3DjOqpRVZ%26default-tabs%3Dcss%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Fellypirelly%2Fpen%2FjOqpRVZ&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/0a6443e8252bd7ff131d33708e8963fc/href">https://medium.com/media/0a6443e8252bd7ff131d33708e8963fc/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7889adf04b69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I improved my favicon game]]></title>
            <link>https://elly-pirelly.medium.com/how-i-improved-my-favicon-game-b848756e780c?source=rss-1ca393a1b0c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b848756e780c</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[better-programming]]></category>
            <dc:creator><![CDATA[Elly Pirelly]]></dc:creator>
            <pubDate>Tue, 23 Feb 2021 17:17:59 GMT</pubDate>
            <atom:updated>2021-02-24T08:06:23.183Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Two Powerpuff Girls avatars of the author, overlapped by little code snippets" src="https://cdn-images-1.medium.com/max/1024/1*RKxZO5aGQbTPo0m9VZPzJw.png" /></figure><h4>and dusted off my Photoshop skills along the way</h4><p>Up until recently I only coded within confined parts of huge monolithic product code. It never occurred to me to look up how favicons are implemented in said legacy code, especially as there weren’t for example any errors in the console thrown.</p><h3>What changed?</h3><p>In (finally!) starting out with my own portfolio site, I challenged things I didn’t question before or (to be frank) simply didn’t have much knowledge about yet. I looked outside my daily work bubble and — as it was now about my own site — wanted to understand and do things right<em>.</em></p><p>While looking up other portfolio sites and inspecting them, in some sites I came across 404 errors, complaining about the favicon.ico. This is when I got curious how to properly implement favicons.</p><h3>Goals</h3><p>While following Chris Coyier’s <a href="https://css-tricks.com/how-to-favicon-in-2021/">“How to Favicon in 2021”</a> and Andrey Sitnik’s <a href="https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs">“How to Favicon in 2021 — six files that fit most needs”</a> approaches:</p><ul><li>to clean up a silly but cute Powerpuff Girls avatar in Photoshop Elements (remove the visible artifacts, recolor, make outline bolder…)</li><li>to limit the amount of Photoshop trickery put in (Photoshop Elements doesn’t support .svg and I didn’t want to redraw the whole avatar so I intended to mainly work with quick selections and quick tonal corrections)</li><li>to keep the general size of 400x400px (aka, not reducing it)</li><li>to have a (subjectively) better quality file with a transparent background to use within my portfolio site (.png)</li><li>to have that (subjectively) better quality file (.png) put through a Favicon Generator to generate files and HTML needed for a proper favicons implementation</li></ul><h3>Starting conditions</h3><figure><img alt="A Powerpuff Girls avatar of the author" src="https://cdn-images-1.medium.com/max/522/1*3Gt5BVgrm7fLuOtakPnBzg.png" /><figcaption>Low quality result of one of those silly “create your own avatar” games back in the day</figcaption></figure><ul><li>a low quality .jpg of a silly but cute Powerpuff Girls avatar of myself (cut off, 72dpi, 400x400px)</li><li>Photoshop Elements 2021 edition (which I juuust bought, so I could test what I still remember from Photoshop CC)</li><li>free tools on the Interwebz</li></ul><h4>A short Photoshop Elements detour</h4><figure><img alt="Three versions of the Powerpuff Girls avatar: the original low quality jpg, the improved outline and the final psd with layers" src="https://cdn-images-1.medium.com/max/1024/1*ANWK5MkHjBbUn6EMV_852Q.png" /><figcaption>Left: the original low quality jpg — middle: the improved outline — right: the final psd with layers</figcaption></figure><p>First, I took the low quality .jpg , cleaned it up from artifacts, thickened the outline, selected all parts and recolored them. As in the .jpg the “standing spot” was cut off, I increased the canvas size and fixed this. The increase resulted in a new file size of 420x420px.</p><p>Next up, I reduced the now multi-layer .psd file to a one-layer .psd file, as I wanted to keep the transparency. I took the one-layer .psd file and saved it for web as PNG-24, 420x420px, resulting in 69KB.</p><figure><img alt="Improved transparent Powerpuff Girls avatar — 420x420px png file" src="https://cdn-images-1.medium.com/max/542/1*BIA4DqG6A9MwKc_3uJhxHg.png" /><figcaption>Improved transparent Powerpuff Girls avatar — 420x420px png file</figcaption></figure><h3>Real Favicon Generator</h3><p>As recommended by Chris Coyier in his article <a href="https://css-tricks.com/how-to-favicon-in-2021/">“How to Favicon in 2021”</a>, I went for the <a href="https://realfavicongenerator.net/">Real Favicon Generator</a> to check which files exactly would be generated in my case (kind of files, file sizes, quality, HTML).</p><figure><img alt="Home page of realfavicongenerator.net" src="https://cdn-images-1.medium.com/max/1024/1*2a8V3CpIOS19IWDPJtko-w.png" /><figcaption>Home page of <a href="https://realfavicongenerator.net/">realfavicongenerator.net</a></figcaption></figure><p>To start generating, there’s three options:</p><ul><li>check an already existing favicon, implemented in an existing website</li><li>demo with a random image</li><li>select your favicon image (which is what I selected to feed it my previously photoshopped .png file)</li></ul><p>Once the upload button is clicked, it might take a short second to get this nice preview where there’s various possibilities to tweak a favicon.</p><figure><img alt="Various possibilities for various browsers/devices to tweak your favicons" src="https://cdn-images-1.medium.com/max/1000/1*94iscCbqqaJ08Z8vHOQiuA.gif" /><figcaption>Various possibilities for various browsers/devices to tweak your favicons</figcaption></figure><h4><strong>Favicon for Desktop Browsers and Google Result Pages</strong></h4><p>For my file, I did not change anything.</p><h4>Favicon for iOS Web Clip</h4><p>For my file, I changed the background to white.</p><h4>Favicon for Android Chrome</h4><p>For my file, I changed the background to white.</p><h4>Windows Metro</h4><p>For my file, I changed the background to teal (#00aba9) as this was one of the suggested (Windows) colors (chose your own if you like).</p><h4>macOS Safari</h4><p>I turned my file into a monochrome icon and adapted the threshold. In my opinion the preview is not really sufficient to evaluate what you get out of this though. I used the same teal color (#00aba9) I had suggested for Windows Metro (for consistency purposes).</p><h4>Favicon Generator Options</h4><p>There’s quite some options to check. For my file, I didn’t change anything and straight away clicked “Generate your Favicons and HTML code”. I immediately copied the then displayed HTML code somewhere safe — to be safe.</p><figure><img alt="Result page of the Real Favicon Generator site" src="https://cdn-images-1.medium.com/max/1024/1*x4F5nxSECHkguks65GLkFA.png" /><figcaption>Result page of the Real Favicon Generator site</figcaption></figure><p>Next I’ve downloaded my package (.zip file). Following were the files included. Very interesting to see which kind of files got generated and also the file sizes.</p><figure><img alt="Generated final files" src="https://cdn-images-1.medium.com/max/775/1*pxWehmZbUcZZlmi7-WrgiQ.png" /><figcaption>Generated final files</figcaption></figure><p>(Heads-up: the Real Favicon Generator didn’t generate an .android-chrome-512x512.png but instead an .android-chrome-384x384.png. As according to both, Chris and Andrey, you need to reference the 512px version in the .webmanifest I took an extra turn and created the missing file in Photoshop myself.)</p><h4>Bonus round: png to svg converter</h4><figure><img alt="Left: svg output from the Real Favicon Generator — right: svg output from Convertio" src="https://cdn-images-1.medium.com/max/1024/1*_R8WM8IEQiF97UjHXsgHqw.png" /><figcaption>Left: svg output from the Real Favicon Generator — right: svg output from Convertio</figcaption></figure><p>The .svg that the Real Favicon Generator returned gave me a bit of <a href="https://en.wikipedia.org/wiki/The_Fly_(1986_film)">“The Fly”</a> vibes so I took my photoshopped .png and fed it to the <a href="https://convertio.co/png-svg/">png to svg converter Convertio</a> just to check if I can have an improvement here. As I liked the outcome better I decided to use it in my favicons.</p><h4>Bonus round: SVG optimizer</h4><p>As my mentor always told me:</p><blockquote>“Always put your svgs through the <a href="https://jakearchibald.github.io/svgomg/">svg optimizer SVGO</a>! In 99% of the cases you will reduce the file size along with other optimizations.”</blockquote><p>This is what I did. As you can see the file size got reduced from 3.42K to 3.2K.</p><figure><img alt="Home page of the svg optimizer" src="https://cdn-images-1.medium.com/max/1024/1*nlJa00yJ38qXqsO0iy0mIA.png" /><figcaption><a href="https://jakearchibald.github.io/svgomg/">https://jakearchibald.github.io/svgomg/</a></figcaption></figure><h3>So far so good</h3><p>I ended up having more or less three versions of HTML code to possibly implement into my own HTML.</p><p><strong>Chris Coyier’s and Andrey Sitnik’s approach, mentioned their articles:</strong></p><pre>// HTML<br>&lt;link rel=&quot;icon&quot; href=&quot;/favicon.ico&quot;&gt;&lt;!-- 32×32 --&gt;<br>&lt;link rel=&quot;icon&quot; href=&quot;/icon.svg&quot; type=&quot;image/svg+xml&quot;&gt;<br>&lt;link rel=&quot;apple-touch-icon&quot; href=&quot;/apple-touch-icon.png&quot;&gt;&lt;!-- 180×180 --&gt;<br>&lt;link rel=&quot;manifest&quot; href=&quot;/manifest.webmanifest&quot;&gt;</pre><pre>// manifest.webmanifest<br>{<br>  &quot;icons&quot;: [<br>    { &quot;src&quot;: &quot;/192.png&quot;, &quot;type&quot;: &quot;image/png&quot;, &quot;sizes&quot;: &quot;192x192&quot; },<br>    { &quot;src&quot;: &quot;/512.png&quot;, &quot;type&quot;: &quot;image/png&quot;, &quot;sizes&quot;: &quot;512x512&quot; }<br>  ]<br>}</pre><p><strong>Chris Coyier’s approach, implemented in </strong><a href="https://css-tricks.com/"><strong>CSS Tricks</strong></a><strong>:</strong></p><pre>// HTML<br>&lt;link rel=&quot;icon&quot; href=&quot;/favicon.ico&quot;&gt;<br>&lt;link rel=&quot;icon&quot; href=&quot;/favicon.svg&quot; type=&quot;image/svg+xml&quot;&gt;<br>&lt;link rel=&quot;apple-touch-icon&quot; href=&quot;/apple-touch-icon.png&quot;&gt;<br>&lt;link rel=&quot;manifest&quot; href=&quot;/manifest.webmanifest&quot;&gt;</pre><pre>// manifest.webmanifest<br>{<br>  &quot;name&quot;: &quot;CSS-Tricks&quot;,<br>  &quot;icons&quot;: [<br>    { &quot;src&quot;: &quot;/icon-192.png&quot;, &quot;type&quot;: &quot;image/png&quot;, &quot;sizes&quot;: &quot;192x192&quot; },<br>    { &quot;src&quot;: &quot;/icon-512.png&quot;, &quot;type&quot;: &quot;image/png&quot;, &quot;sizes&quot;: &quot;512x512&quot; }<br>  ]<br>}</pre><p><strong>Generated Real Favicon Generator code:</strong></p><pre>// HTML<br>&lt;link rel=&quot;apple-touch-icon&quot; sizes=&quot;180x180&quot; href=&quot;/apple-touch-icon.png&quot;&gt;<br>&lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; sizes=&quot;32x32&quot; href=&quot;/favicon-32x32.png&quot;&gt;<br>&lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; sizes=&quot;16x16&quot; href=&quot;/favicon-16x16.png&quot;&gt;<br>&lt;link rel=&quot;manifest&quot; href=&quot;/site.webmanifest&quot;&gt;<br>&lt;link rel=&quot;mask-icon&quot; href=&quot;/safari-pinned-tab.svg&quot; color=&quot;#00aba9&quot;&gt;<br>&lt;meta name=&quot;msapplication-TileColor&quot; content=&quot;#00aba9&quot;&gt;<br>&lt;meta name=&quot;theme-color&quot; content=&quot;#ffffff&quot;&gt;</pre><pre>// manifest.webmanifest<br>{<br>    &quot;name&quot;: &quot;&quot;,<br>    &quot;short_name&quot;: &quot;&quot;,<br>    &quot;icons&quot;: [<br>        {<br>            &quot;src&quot;: &quot;/android-chrome-192x192.png&quot;,<br>            &quot;sizes&quot;: &quot;192x192&quot;,<br>            &quot;type&quot;: &quot;image/png&quot;<br>        },<br>        {<br>            &quot;src&quot;: &quot;/android-chrome-384x384.png&quot;,<br>            &quot;sizes&quot;: &quot;384x384&quot;,<br>            &quot;type&quot;: &quot;image/png&quot;<br>        }<br>    ],<br>    &quot;theme_color&quot;: &quot;#ffffff&quot;,<br>    &quot;background_color&quot;: &quot;#ffffff&quot;,<br>    &quot;display&quot;: &quot;standalone&quot;<br>}</pre><p>I decided to follow the CSS Tricks approach regarding the naming of favicons, minus the “name” property within the .webmanifest.</p><h3>Finally final code</h3><p>Those were the final favicon files I used. The ones I’ve picked were dependent on what I decided to have as HTML code and also needed to be referenced in the .webmanifest. I deleted the ones not needed anymore. As recommended by Andrey I didn’t get creative where to put the favicon files in my project and put all of them at root level.</p><figure><img alt="Uploaded final files" src="https://cdn-images-1.medium.com/max/781/1*aj_DUXBcN-8a29Kx6yjwzQ.png" /><figcaption>Uploaded final files</figcaption></figure><p>Final HTML code that ended up in my &lt;head&gt;:</p><pre>// HTML<br>&lt;head&gt;<br>    // etc...<br>    &lt;link rel=&quot;icon&quot; href=&quot;/favicon.ico&quot;&gt;<br>    &lt;link rel=&quot;icon&quot; href=&quot;/icon.svg&quot; type=&quot;image/svg+xml&quot;&gt;<br>    &lt;link rel=&quot;apple-touch-icon&quot; href=&quot;/apple-touch-icon.png&quot;&gt;<br>    &lt;link rel=&quot;manifest&quot; href=&quot;/manifest.webmanifest&quot;&gt;<br>    // etc...<br>&lt;/head&gt;</pre><p>The .webmanifest I use:</p><pre>// manifest.webmanifest<br>{<br>    &quot;icons&quot;: [<br>    { &quot;src&quot;: &quot;/icon-192.png&quot;, &quot;type&quot;: &quot;image/png&quot;, &quot;sizes&quot;: &quot;192x192&quot; },<br>    { &quot;src&quot;: &quot;/icon-512.png&quot;, &quot;type&quot;: &quot;image/png&quot;, &quot;sizes&quot;: &quot;512x512&quot; }<br>    ]<br>}</pre><h3>Conclusion</h3><p>Goals achieved.</p><ul><li>I dusted off my Photoshop skills and created a .png file I used for both — favicon generation and portfolio site</li><li>I got a first understanding of how favicons work across browsers/devices — and what is of importance for implementation</li></ul><p>Excluding the Photoshop Elements detour, in my opinion the Real Favicon Generator is a great way to quickly generate favicons — even from a .png. Along with Chris’ and Andrey’s approaches, it’s pretty easy to improve your website in including the latest findings on favicons into your websites.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b848756e780c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>