Yarn font awesome icon Usage,CSS Class Name,SVG & CSS Content Code

Yarn font awesome icon css class name is fa-yarn and CSS Content Code is \f7e3.

Yarn font awesome icon is part of brands icons.

Yarn font awesome icon usage

We can display Yarn font awesome icon using 3 different ways depending upon our requirement.

  1. Using CSS Class Name

  2. Using CSS Content Code

  3. Using SVG

Yarn font awesome icon CSS class name

To display Yarn font awesome icon, add predefined class name i.e.,fa-yarn (with prefix fa-) to the i tag.

And we need to add corresponding font awesome icon style for the Yarn icon.

Yarn icon has 1 icon style i.e.,brands. We need to append icon style class fab.

<i class='fab fa-yarn'></i>

Output:

Yarn font awesome icon CSS Content Code

We can display Yarn font awesome icon using it’s CSS Content Code \f7e3

Use the following HTML code

<li><span class='Yarn fontawesomeicon'></span>Yarn</li>

Apply CSS code

<style> 
.fontawesomeicon::before {
    display: inline-block;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
 }

.Yarn::before {
   font: var(--fa-font-brands);
    content: ' \f7e3';
 }</style>

Output:

  • Yarn
  • For the detailed tutorial visit https://www.angularjswiki.com/fontawesome/csscontentcode/

    Yarn font awesome icon SVG

    Use the following icon SVG to display Yarn font awesome icon.

    <svg class='fontawesomesvg' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M393.9 345.2c-39 9.3-48.4 32.1-104 47.4 0 0-2.7 4-10.4 5.8-13.4 3.3-63.9 6-68.5 6.1-12.4.1-19.9-3.2-22-8.2-6.4-15.3 9.2-22 9.2-22-8.1-5-9-9.9-9.8-8.1-2.4 5.8-3.6 20.1-10.1 26.5-8.8 8.9-25.5 5.9-35.3.8-10.8-5.7.8-19.2.8-19.2s-5.8 3.4-10.5-3.6c-6-9.3-17.1-37.3 11.5-62-1.3-10.1-4.6-53.7 40.6-85.6 0 0-20.6-22.8-12.9-43.3 5-13.4 7-13.3 8.6-13.9 5.7-2.2 11.3-4.6 15.4-9.1 20.6-22.2 46.8-18 46.8-18s12.4-37.8 23.9-30.4c3.5 2.3 16.3 30.6 16.3 30.6s13.6-7.9 15.1-5c8.2 16 9.2 46.5 5.6 65.1-6.1 30.6-21.4 47.1-27.6 57.5-1.4 2.4 16.5 10 27.8 41.3 10.4 28.6 1.1 52.7 2.8 55.3.8 1.4 13.7.8 36.4-13.2 12.8-7.9 28.1-16.9 45.4-17 16.7-.5 17.6 19.2 4.9 22.2zM496 256c0 136.9-111.1 248-248 248S0 392.9 0 256 111.1 8 248 8s248 111.1 248 248zm-79.3 75.2c-1.7-13.6-13.2-23-28-22.8-22 .3-40.5 11.7-52.8 19.2-4.8 3-8.9 5.2-12.4 6.8 3.1-44.5-22.5-73.1-28.7-79.4 7.8-11.3 18.4-27.8 23.4-53.2 4.3-21.7 3-55.5-6.9-74.5-1.6-3.1-7.4-11.2-21-7.4-9.7-20-13-22.1-15.6-23.8-1.1-.7-23.6-16.4-41.4 28-12.2.9-31.3 5.3-47.5 22.8-2 2.2-5.9 3.8-10.1 5.4h.1c-8.4 3-12.3 9.9-16.9 22.3-6.5 17.4.2 34.6 6.8 45.7-17.8 15.9-37 39.8-35.7 82.5-34 36-11.8 73-5.6 79.6-1.6 11.1 3.7 19.4 12 23.8 12.6 6.7 30.3 9.6 43.9 2.8 4.9 5.2 13.8 10.1 30 10.1 6.8 0 58-2.9 72.6-6.5 6.8-1.6 11.5-4.5 14.6-7.1 9.8-3.1 36.8-12.3 62.2-28.7 18-11.7 24.2-14.2 37.6-17.4 12.9-3.2 21-15.1 19.4-28.2z"/></svg>
    
    

    Use the following HTML code

    <p>This <svg class='fontawesomesvg' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M393.9 345.2c-39 9.3-48.4 32.1-104 47.4 0 0-2.7 4-10.4 5.8-13.4 3.3-63.9 6-68.5 6.1-12.4.1-19.9-3.2-22-8.2-6.4-15.3 9.2-22 9.2-22-8.1-5-9-9.9-9.8-8.1-2.4 5.8-3.6 20.1-10.1 26.5-8.8 8.9-25.5 5.9-35.3.8-10.8-5.7.8-19.2.8-19.2s-5.8 3.4-10.5-3.6c-6-9.3-17.1-37.3 11.5-62-1.3-10.1-4.6-53.7 40.6-85.6 0 0-20.6-22.8-12.9-43.3 5-13.4 7-13.3 8.6-13.9 5.7-2.2 11.3-4.6 15.4-9.1 20.6-22.2 46.8-18 46.8-18s12.4-37.8 23.9-30.4c3.5 2.3 16.3 30.6 16.3 30.6s13.6-7.9 15.1-5c8.2 16 9.2 46.5 5.6 65.1-6.1 30.6-21.4 47.1-27.6 57.5-1.4 2.4 16.5 10 27.8 41.3 10.4 28.6 1.1 52.7 2.8 55.3.8 1.4 13.7.8 36.4-13.2 12.8-7.9 28.1-16.9 45.4-17 16.7-.5 17.6 19.2 4.9 22.2zM496 256c0 136.9-111.1 248-248 248S0 392.9 0 256 111.1 8 248 8s248 111.1 248 248zm-79.3 75.2c-1.7-13.6-13.2-23-28-22.8-22 .3-40.5 11.7-52.8 19.2-4.8 3-8.9 5.2-12.4 6.8 3.1-44.5-22.5-73.1-28.7-79.4 7.8-11.3 18.4-27.8 23.4-53.2 4.3-21.7 3-55.5-6.9-74.5-1.6-3.1-7.4-11.2-21-7.4-9.7-20-13-22.1-15.6-23.8-1.1-.7-23.6-16.4-41.4 28-12.2.9-31.3 5.3-47.5 22.8-2 2.2-5.9 3.8-10.1 5.4h.1c-8.4 3-12.3 9.9-16.9 22.3-6.5 17.4.2 34.6 6.8 45.7-17.8 15.9-37 39.8-35.7 82.5-34 36-11.8 73-5.6 79.6-1.6 11.1 3.7 19.4 12 23.8 12.6 6.7 30.3 9.6 43.9 2.8 4.9 5.2 13.8 10.1 30 10.1 6.8 0 58-2.9 72.6-6.5 6.8-1.6 11.5-4.5 14.6-7.1 9.8-3.1 36.8-12.3 62.2-28.7 18-11.7 24.2-14.2 37.6-17.4 12.9-3.2 21-15.1 19.4-28.2z"/></svg>
     Yarn displayed using SVG</p>
    

    Apply CSS code

    
      <style>
        .fontawesomesvg {width: 1em;
          height: 1em;
          vertical-align: -.125em;
        }
      </style>
    
    

    Output:

    This Yarn displayed using SVG

    Change Yarn font awesome icon size

    To increase Yarn font awesome icon size, use the fa-lg(33 % increase), fa-2x, fa-3x, fa-4x, or fa-5x classes along with icon class \f7e3. Increase in icon size will be relative to their parent container.

    <i class='fab fa-yarn fa-lg'>fa-lg</i><br/>
    <i class='fab fa-yarn fa-2x'>fa-2x</i><br/>
    <i class='fab fa-yarn fa-3x'>fa-3x</i><br/>
    <i class='fab fa-yarn fa-4x'>fa-4x</i><br/>
    <i class='fab fa-yarn fa-5x'>fa-5x</i><br/>
    
    

    Output:

    fa-lg
    fa-2x
    fa-3x
    fa-4x
    fa-5x

    Yarn font awesome icon with Fixed Width

    All the font awesome icons does not have same width.

    For example Yarn icon and home icon may not have same height and width.

    So to display two icons with fixed width and height we can use fa-fw class.

    <i style='border:1px solid;' class='fab fa-yarn fa-fw fa-3x'></i>Fixed Width<i style='border:1px solid;' class='fab fa-yarn fa-3x'></i>Normal<br/>
    <i style='border:1px solid;' class='fas fa-home fa-fw fa-3x'></i>Fixed Width<i style='border:1px solid;' class='fas fa-home fa-3x'></i>Normal<br/>
    
    

    Output:

    Fixed WidthNormal
    Fixed WidthNormal

    Yarn font awesome icon Border

    To add border to Yarn font awesome icon, use fa-border class.

    <i class='fab fa-yarn fa-border fa-3x'></i>
    

    Output:

    Pull Yarn font awesome icon To the left

    To pull Yarn icon to the left of the container use fa-pull-left class.

    <div style='width: 200px;'>
    <i class='fab fa-yarn fa-pull-left fa-3x'></i>
      ... The text after Yarn Icon will be displayed on the right side of the icon.
    </div>
    <div style = 'clear: both;'></div>
    

    Output:

    ... The text after Yarn Icon will be displayed on the right side of the icon.

    Pull Yarn font awesome icon To the left

    To pull Yarn icon to the right of the container use fa-pull-right class.

    <div style='width: 200px;'>
    <i class='fab fa-yarn fa-pull-right fa-3x'></i>
      ... The text after Yarn Icon will be displayed on the left side of the icon.
    </div>
    <div style = 'clear: both;'></div>
    

    Output:

    ... The text after Yarn Icon will be displayed on the left side of the icon.

    Animate Yarn font awesome icon

    To animate Yarn font awesome icon, use fa-spin class.

    <i class='fab fa-yarn fa-spin fa-3x'></i>
    

    Output:

    Animate Yarn font awesome icon with steps

    While animating the font awesome icon,We can rotate Yarn icon in 8 steps instead of uniform rotation.

    We can use fa-pulse icon along with fa-spin class.

    <i class='fab fa-yarn fa-spin fa-pulse fa-3x'></i>
    

    Output:

    Rotate Yarn font awesome icon

    To rotate Yarn font awesome icon, Use fa-rotate-x class

    Where ‘x’ represents degree of rotation.

    <div>
    <i class='fab fa-yarn fa-3x'>R</i>normal<br/><br/>
    <i class='fab fa-yarn fa-rotate-90 fa-3x'>R</i> fa-rotate-90<br/><br/> 
    <i class='fab fa-yarn fa-rotate-180  fa-3x'>R</i> fa-rotate-180<br/><br/> 
    <i class='fab fa-yarn fa-rotate-270 fa-3x'>R</i> fa-rotate-270<br/><br/>
    </div>
    

    Output:

    Rnormal

    R fa-rotate-90

    R fa-rotate-180

    R fa-rotate-270

    Flip Yarn font awesome icon

    To flip Yarn font awesome icon horizontally and vertically use fa-flip-horizontal and fa-flip-vertical classes.

    <div>
    <i class='fab fa-yarn fa-3x'>F</i> Normal <br>
    <i class='fab fa-yarn fa-flip-horizontal fa-3x'>F</i> fa-flip-horizontal<br>
    <i class='fab fa-yarn fa-flip-vertical fa-3x'>F</i> fa-flip-vertical<br>
    </div>
    

    Output:

    F Normal
    F fa-flip-horizontal
    F fa-flip-vertical

    Combine Yarn font awesome icon with other font awesome icons

    In font awesome icons,using stacking we can combine multiple icons and display it as one icon.

    To do that use the fa-stack class on the parent, the fa-stack-1x for the regularly sized icon, and fa-stack-2x for the larger icon.

    And use class fa-inverse for an alternative icon color.

    In the below example, I am displaying Yarn font awesome icon on top of icons like fa-square,fa-circle and fa-ban.

    And used fa-inverse in the second example to invert the color of the icon.

    <div>
        <span class='fa-stack fa-lg'>
            <i class='far fa-square fa-stack-2x'></i>
            <i class='fab fa-yarn fa-stack-1x'></i>
        </span>
          Yarn on fa-square<br>
        <span class='fa-stack fa-lg'>
            <i class='fas fa-circle fa-stack-2x'></i>
            <i class='fab fa-yarn fa-stack-1x fa-inverse'></i>
        </span>
          Yarn on fa-circle<br>
    
        <span class='fa-stack fa-lg'>
            <i class='fab fa-yarn fa-stack-1x'></i>
            <i class='fas fa-ban fa-stack-2x'></i>
        </span>
          Yarn on fa-ban
    </div>
    

    Output:

    Yarn on fa-square
    Yarn on fa-circle
    Yarn on fa-ban
    Avatar

    Arunkumar Gudelli

    Liked this post? Subscribe