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

Grav font awesome icon css class name is fa-grav and CSS Content Code is \f2d6.

Grav font awesome icon is part of brands icons.

Grav font awesome icon usage

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

  1. Using CSS Class Name

  2. Using CSS Content Code

  3. Using SVG

Grav font awesome icon CSS class name

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

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

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

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

Output:

Grav font awesome icon CSS Content Code

We can display Grav font awesome icon using it’s CSS Content Code \f2d6

Use the following HTML code

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

Apply CSS code

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

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

Output:

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

    Grav font awesome icon SVG

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

    <svg class='fontawesomesvg' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 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="M301.1 212c4.4 4.4 4.4 11.9 0 16.3l-9.7 9.7c-4.4 4.7-11.9 4.7-16.6 0l-10.5-10.5c-4.4-4.7-4.4-11.9 0-16.6l9.7-9.7c4.4-4.4 11.9-4.4 16.6 0l10.5 10.8zm-30.2-19.7c3-3 3-7.8 0-10.5-2.8-3-7.5-3-10.5 0-2.8 2.8-2.8 7.5 0 10.5 3.1 2.8 7.8 2.8 10.5 0zm-26 5.3c-3 2.8-3 7.5 0 10.2 2.8 3 7.5 3 10.5 0 2.8-2.8 2.8-7.5 0-10.2-3-3-7.7-3-10.5 0zm72.5-13.3c-19.9-14.4-33.8-43.2-11.9-68.1 21.6-24.9 40.7-17.2 59.8.8 11.9 11.3 29.3 24.9 17.2 48.2-12.5 23.5-45.1 33.2-65.1 19.1zm47.7-44.5c-8.9-10-23.3 6.9-15.5 16.1 7.4 9 32.1 2.4 15.5-16.1zM504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-66.2 42.6c2.5-16.1-20.2-16.6-25.2-25.7-13.6-24.1-27.7-36.8-54.5-30.4 11.6-8 23.5-6.1 23.5-6.1.3-6.4 0-13-9.4-24.9 3.9-12.5.3-22.4.3-22.4 15.5-8.6 26.8-24.4 29.1-43.2 3.6-31-18.8-59.2-49.8-62.8-22.1-2.5-43.7 7.7-54.3 25.7-23.2 40.1 1.4 70.9 22.4 81.4-14.4-1.4-34.3-11.9-40.1-34.3-6.6-25.7 2.8-49.8 8.9-61.4 0 0-4.4-5.8-8-8.9 0 0-13.8 0-24.6 5.3 11.9-15.2 25.2-14.4 25.2-14.4 0-6.4-.6-14.9-3.6-21.6-5.4-11-23.8-12.9-31.7 2.8.1-.2.3-.4.4-.5-5 11.9-1.1 55.9 16.9 87.2-2.5 1.4-9.1 6.1-13 10-21.6 9.7-56.2 60.3-56.2 60.3-28.2 10.8-77.2 50.9-70.6 79.7.3 3 1.4 5.5 3 7.5-2.8 2.2-5.5 5-8.3 8.3-11.9 13.8-5.3 35.2 17.7 24.4 15.8-7.2 29.6-20.2 36.3-30.4 0 0-5.5-5-16.3-4.4 27.7-6.6 34.3-9.4 46.2-9.1 8 3.9 8-34.3 8-34.3 0-14.7-2.2-31-11.1-41.5 12.5 12.2 29.1 32.7 28 60.6-.8 18.3-15.2 23-15.2 23-9.1 16.6-43.2 65.9-30.4 106 0 0-9.7-14.9-10.2-22.1-17.4 19.4-46.5 52.3-24.6 64.5 26.6 14.7 108.8-88.6 126.2-142.3 34.6-20.8 55.4-47.3 63.9-65 22 43.5 95.3 94.5 101.1 59z"/></svg>
    
    

    Use the following HTML code

    <p>This <svg class='fontawesomesvg' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 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="M301.1 212c4.4 4.4 4.4 11.9 0 16.3l-9.7 9.7c-4.4 4.7-11.9 4.7-16.6 0l-10.5-10.5c-4.4-4.7-4.4-11.9 0-16.6l9.7-9.7c4.4-4.4 11.9-4.4 16.6 0l10.5 10.8zm-30.2-19.7c3-3 3-7.8 0-10.5-2.8-3-7.5-3-10.5 0-2.8 2.8-2.8 7.5 0 10.5 3.1 2.8 7.8 2.8 10.5 0zm-26 5.3c-3 2.8-3 7.5 0 10.2 2.8 3 7.5 3 10.5 0 2.8-2.8 2.8-7.5 0-10.2-3-3-7.7-3-10.5 0zm72.5-13.3c-19.9-14.4-33.8-43.2-11.9-68.1 21.6-24.9 40.7-17.2 59.8.8 11.9 11.3 29.3 24.9 17.2 48.2-12.5 23.5-45.1 33.2-65.1 19.1zm47.7-44.5c-8.9-10-23.3 6.9-15.5 16.1 7.4 9 32.1 2.4 15.5-16.1zM504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-66.2 42.6c2.5-16.1-20.2-16.6-25.2-25.7-13.6-24.1-27.7-36.8-54.5-30.4 11.6-8 23.5-6.1 23.5-6.1.3-6.4 0-13-9.4-24.9 3.9-12.5.3-22.4.3-22.4 15.5-8.6 26.8-24.4 29.1-43.2 3.6-31-18.8-59.2-49.8-62.8-22.1-2.5-43.7 7.7-54.3 25.7-23.2 40.1 1.4 70.9 22.4 81.4-14.4-1.4-34.3-11.9-40.1-34.3-6.6-25.7 2.8-49.8 8.9-61.4 0 0-4.4-5.8-8-8.9 0 0-13.8 0-24.6 5.3 11.9-15.2 25.2-14.4 25.2-14.4 0-6.4-.6-14.9-3.6-21.6-5.4-11-23.8-12.9-31.7 2.8.1-.2.3-.4.4-.5-5 11.9-1.1 55.9 16.9 87.2-2.5 1.4-9.1 6.1-13 10-21.6 9.7-56.2 60.3-56.2 60.3-28.2 10.8-77.2 50.9-70.6 79.7.3 3 1.4 5.5 3 7.5-2.8 2.2-5.5 5-8.3 8.3-11.9 13.8-5.3 35.2 17.7 24.4 15.8-7.2 29.6-20.2 36.3-30.4 0 0-5.5-5-16.3-4.4 27.7-6.6 34.3-9.4 46.2-9.1 8 3.9 8-34.3 8-34.3 0-14.7-2.2-31-11.1-41.5 12.5 12.2 29.1 32.7 28 60.6-.8 18.3-15.2 23-15.2 23-9.1 16.6-43.2 65.9-30.4 106 0 0-9.7-14.9-10.2-22.1-17.4 19.4-46.5 52.3-24.6 64.5 26.6 14.7 108.8-88.6 126.2-142.3 34.6-20.8 55.4-47.3 63.9-65 22 43.5 95.3 94.5 101.1 59z"/></svg>
     Grav displayed using SVG</p>
    

    Apply CSS code

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

    Output:

    This Grav displayed using SVG

    Change Grav font awesome icon size

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

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

    Output:

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

    Grav font awesome icon with Fixed Width

    All the font awesome icons does not have same width.

    For example Grav 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-grav fa-fw fa-3x'></i>Fixed Width<i style='border:1px solid;' class='fab fa-grav 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

    Grav font awesome icon Border

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

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

    Output:

    Pull Grav font awesome icon To the left

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

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

    Output:

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

    Pull Grav font awesome icon To the left

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

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

    Output:

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

    Animate Grav font awesome icon

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

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

    Output:

    Animate Grav font awesome icon with steps

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

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

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

    Output:

    Rotate Grav font awesome icon

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

    Where ‘x’ represents degree of rotation.

    <div>
    <i class='fab fa-grav fa-3x'>R</i>normal<br/><br/>
    <i class='fab fa-grav fa-rotate-90 fa-3x'>R</i> fa-rotate-90<br/><br/> 
    <i class='fab fa-grav fa-rotate-180  fa-3x'>R</i> fa-rotate-180<br/><br/> 
    <i class='fab fa-grav 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 Grav font awesome icon

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

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

    Output:

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

    Combine Grav 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 Grav 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-grav fa-stack-1x'></i>
        </span>
          Grav on fa-square<br>
        <span class='fa-stack fa-lg'>
            <i class='fas fa-circle fa-stack-2x'></i>
            <i class='fab fa-grav fa-stack-1x fa-inverse'></i>
        </span>
          Grav on fa-circle<br>
    
        <span class='fa-stack fa-lg'>
            <i class='fab fa-grav fa-stack-1x'></i>
            <i class='fas fa-ban fa-stack-2x'></i>
        </span>
          Grav on fa-ban
    </div>
    

    Output:

    Grav on fa-square
    Grav on fa-circle
    Grav on fa-ban
    Liked this post? Subscribe