<?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 Simon Depelchin on Medium]]></title>
        <description><![CDATA[Stories by Simon Depelchin on Medium]]></description>
        <link>https://medium.com/@simondepelchin?source=rss-93bb7b3f48ca------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*v7KfRDCGPSJGDQJquOWK_A.jpeg</url>
            <title>Stories by Simon Depelchin on Medium</title>
            <link>https://medium.com/@simondepelchin?source=rss-93bb7b3f48ca------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 01:04:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@simondepelchin/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[How to use Font Awesome 5 SVGs with Laravel Blade]]></title>
            <link>https://medium.com/@simondepelchin/how-to-use-font-awesome-5-svgs-with-laravel-blade-a5dc93743cd0?source=rss-93bb7b3f48ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5dc93743cd0</guid>
            <category><![CDATA[icons]]></category>
            <category><![CDATA[svg]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[font-awesome]]></category>
            <category><![CDATA[laravel-blade]]></category>
            <dc:creator><![CDATA[Simon Depelchin]]></dc:creator>
            <pubDate>Thu, 01 Mar 2018 14:11:00 GMT</pubDate>
            <atom:updated>2018-03-01T14:37:26.237Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNnBLLLYXr4MsxPLI4gSfA.png" /></figure><p>I’ve been a huge fan of Font Awesome from the start and I think they made great improvements with their 5th version.</p><p>I’ve not used Font Awesome in a long time and since then I used SVGs almost all the time. So when I decided to use Font Awesome 5 I was a little bit frustrated to see how uneasy it was to use their library.</p><p>They push you to use the Javascript integration and I like to avoid Javascript as much as possible for icons.</p><p>Today I found a way to use Font Awesome 5 SVGs directly within Blade.</p><h3>Blade SVG + Font Awesome 5</h3><p><a href="https://github.com/adamwathan/blade-svg">adamwathan/blade-svg</a></p><p><a href="https://github.com/adamwathan/blade-svg">Blade SVG</a> is a nice little package that adds a new directive for either inline SVG or SVG sprites. As it only supports one spritesheet, I’ll use the inline option.</p><p>Here’s how to install it with Composer:</p><p>composer require nothingworks/blade-svg</p><p>Then publish the config file:</p><pre>php artisan vendor:publish --provider=&quot;BladeSvg\BladeSvgServiceProvider&quot;</pre><p>Update the config/blade-svg.php to add the icon class to all the SVGs.</p><pre>&lt;?php<br><br>return [<br>    // ...<br>    &#39;class&#39; =&gt; &#39;icon&#39;, // Add the `icon` class to every SVG when rendered<br>    // ...<br>];</pre><p>Download <a href="https://fontawesome.com/">Font Awesome 5</a> (Free or Pro) and copy the advanced-options/raw-svg contents to your application resources/assets/svg directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*TAWm51ccj7w7HLx0DofEzw.png" /></figure><p>You’re ready, you can start using it in your templates:</p><pre>@svg(&#39;brands/github&#39;)</pre><pre>@svg(&#39;regular/bars&#39;, &#39;text-white&#39;)</pre><p>You’ll see that by default, the icons are really huge and not styled. That’s why I added the icon class. Here’s how I define it in my CSS:</p><pre>.icon {<br>    fill: currentColor;<br>    display: inline-block;<br>    font-size: inherit;<br>    height: 1em;<br>    overflow: visible;<br>    vertical-align: -.125em;<br>}</pre><p>Voilà! You’re good to go.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5dc93743cd0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>