Drupal font awesome icon Usage,CSS Class Name,SVG & CSS Content Code
Drupal font awesome icon css class name is fa-drupal and CSS Content Code is \f1a9.
Drupal font awesome icon is part of brands icons.
Drupal font awesome icon usage
We can display Drupal font awesome icon using 3 different ways depending upon our requirement.
Using CSS Class Name
Using CSS Content Code
Using SVG
Drupal font awesome icon CSS class name
To display Drupal font awesome icon, add predefined class name i.e.,fa-drupal (with prefix fa-) to the i tag.
And we need to add corresponding font awesome icon style for the Drupal icon.
Drupal icon has 1 icon style i.e.,brands.
We need to append icon style class fab.
<i class='fab fa-drupal'></i>
Output:
Drupal font awesome icon CSS Content Code
We can display Drupal font awesome icon using it’s CSS Content Code \f1a9
Use the following HTML code
<li><span class='Drupal fontawesomeicon'></span>Drupal</li>
Apply CSS code
<style>
.fontawesomeicon::before {
display: inline-block;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
}
.Drupal::before {
font: var(--fa-font-brands);
content: ' \f1a9';
}</style>
Output:
For the detailed tutorial visit https://www.angularjswiki.com/fontawesome/csscontentcode/
Drupal font awesome icon SVG
Use the following icon SVG to display Drupal font awesome icon.
<svg class='fontawesomesvg' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 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="M303.973,108.136C268.2,72.459,234.187,38.35,224.047,0c-9.957,38.35-44.25,72.459-80.019,108.136C90.467,161.7,29.716,222.356,29.716,313.436c-2.337,107.3,82.752,196.18,190.053,198.517S415.948,429.2,418.285,321.9q.091-4.231,0-8.464C418.285,222.356,357.534,161.7,303.973,108.136Zm-174.326,223a130.282,130.282,0,0,0-15.211,24.153,4.978,4.978,0,0,1-3.319,2.766h-1.659c-4.333,0-9.219-8.481-9.219-8.481h0c-1.29-2.028-2.489-4.149-3.687-6.361l-.83-1.752c-11.247-25.72-1.475-62.318-1.475-62.318h0a160.585,160.585,0,0,1,23.231-49.873A290.8,290.8,0,0,1,138.5,201.613l9.219,9.219,43.512,44.434a4.979,4.979,0,0,1,0,6.638L145.78,312.33h0Zm96.612,127.311a67.2,67.2,0,0,1-49.781-111.915c14.2-16.871,31.528-33.464,50.334-55.313,22.309,23.785,36.875,40.1,51.164,57.986a28.413,28.413,0,0,1,2.95,4.425,65.905,65.905,0,0,1,11.984,37.981,66.651,66.651,0,0,1-66.466,66.836ZM352.371,351.6h0a7.743,7.743,0,0,1-6.176,5.347H344.9a11.249,11.249,0,0,1-6.269-5.07h0a348.21,348.21,0,0,0-39.456-48.952L281.387,284.49,222.3,223.185a497.888,497.888,0,0,1-35.4-36.322,12.033,12.033,0,0,0-.922-1.382,35.4,35.4,0,0,1-4.7-9.219V174.51a31.346,31.346,0,0,1,9.218-27.656c11.432-11.431,22.955-22.954,33.833-34.939,11.984,13.275,24.8,26,37.428,38.627h0a530.991,530.991,0,0,1,69.6,79.1,147.494,147.494,0,0,1,27.011,83.8A134.109,134.109,0,0,1,352.371,351.6Z"/></svg>
Use the following HTML code
<p>This <svg class='fontawesomesvg' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 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="M303.973,108.136C268.2,72.459,234.187,38.35,224.047,0c-9.957,38.35-44.25,72.459-80.019,108.136C90.467,161.7,29.716,222.356,29.716,313.436c-2.337,107.3,82.752,196.18,190.053,198.517S415.948,429.2,418.285,321.9q.091-4.231,0-8.464C418.285,222.356,357.534,161.7,303.973,108.136Zm-174.326,223a130.282,130.282,0,0,0-15.211,24.153,4.978,4.978,0,0,1-3.319,2.766h-1.659c-4.333,0-9.219-8.481-9.219-8.481h0c-1.29-2.028-2.489-4.149-3.687-6.361l-.83-1.752c-11.247-25.72-1.475-62.318-1.475-62.318h0a160.585,160.585,0,0,1,23.231-49.873A290.8,290.8,0,0,1,138.5,201.613l9.219,9.219,43.512,44.434a4.979,4.979,0,0,1,0,6.638L145.78,312.33h0Zm96.612,127.311a67.2,67.2,0,0,1-49.781-111.915c14.2-16.871,31.528-33.464,50.334-55.313,22.309,23.785,36.875,40.1,51.164,57.986a28.413,28.413,0,0,1,2.95,4.425,65.905,65.905,0,0,1,11.984,37.981,66.651,66.651,0,0,1-66.466,66.836ZM352.371,351.6h0a7.743,7.743,0,0,1-6.176,5.347H344.9a11.249,11.249,0,0,1-6.269-5.07h0a348.21,348.21,0,0,0-39.456-48.952L281.387,284.49,222.3,223.185a497.888,497.888,0,0,1-35.4-36.322,12.033,12.033,0,0,0-.922-1.382,35.4,35.4,0,0,1-4.7-9.219V174.51a31.346,31.346,0,0,1,9.218-27.656c11.432-11.431,22.955-22.954,33.833-34.939,11.984,13.275,24.8,26,37.428,38.627h0a530.991,530.991,0,0,1,69.6,79.1,147.494,147.494,0,0,1,27.011,83.8A134.109,134.109,0,0,1,352.371,351.6Z"/></svg>
Drupal displayed using SVG</p>
Apply CSS code
<style>
.fontawesomesvg {width: 1em;
height: 1em;
vertical-align: -.125em;
}
</style>
Output:
This Drupal displayed using SVG
Change Drupal font awesome icon size
To increase Drupal font awesome icon size, use the fa-lg(33 % increase), fa-2x, fa-3x, fa-4x, or fa-5x classes along with icon class \f1a9.
Increase in icon size will be relative to their parent container.
<i class='fab fa-drupal fa-lg'>fa-lg</i><br/>
<i class='fab fa-drupal fa-2x'>fa-2x</i><br/>
<i class='fab fa-drupal fa-3x'>fa-3x</i><br/>
<i class='fab fa-drupal fa-4x'>fa-4x</i><br/>
<i class='fab fa-drupal fa-5x'>fa-5x</i><br/>
Output:
fa-lgfa-2x
fa-3x
fa-4x
fa-5x
Drupal font awesome icon with Fixed Width
All the font awesome icons does not have same width.
For example Drupal 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-drupal fa-fw fa-3x'></i>Fixed Width<i style='border:1px solid;' class='fab fa-drupal 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 WidthNormalFixed WidthNormal
Drupal font awesome icon Border
To add border to Drupal font awesome icon, use fa-border class.
<i class='fab fa-drupal fa-border fa-3x'></i>
Output:
Pull Drupal font awesome icon To the left
To pull Drupal icon to the left of the container use fa-pull-left class.
<div style='width: 200px;'>
<i class='fab fa-drupal fa-pull-left fa-3x'></i>
... The text after Drupal Icon will be displayed on the right side of the icon.
</div>
<div style = 'clear: both;'></div>
Output:
Pull Drupal font awesome icon To the left
To pull Drupal icon to the right of the container use fa-pull-right class.
<div style='width: 200px;'>
<i class='fab fa-drupal fa-pull-right fa-3x'></i>
... The text after Drupal Icon will be displayed on the left side of the icon.
</div>
<div style = 'clear: both;'></div>
Output:
Animate Drupal font awesome icon
To animate Drupal font awesome icon, use fa-spin class.
<i class='fab fa-drupal fa-spin fa-3x'></i>
Output:
Animate Drupal font awesome icon with steps
While animating the font awesome icon,We can rotate Drupal icon in 8 steps instead of uniform rotation.
We can use fa-pulse icon along with fa-spin class.
<i class='fab fa-drupal fa-spin fa-pulse fa-3x'></i>
Output:
Rotate Drupal font awesome icon
To rotate Drupal font awesome icon, Use fa-rotate-x class
Where ‘x’ represents degree of rotation.
<div>
<i class='fab fa-drupal fa-3x'>R</i>normal<br/><br/>
<i class='fab fa-drupal fa-rotate-90 fa-3x'>R</i> fa-rotate-90<br/><br/>
<i class='fab fa-drupal fa-rotate-180 fa-3x'>R</i> fa-rotate-180<br/><br/>
<i class='fab fa-drupal fa-rotate-270 fa-3x'>R</i> fa-rotate-270<br/><br/>
</div>
Output:
R fa-rotate-90
R fa-rotate-180
R fa-rotate-270
Flip Drupal font awesome icon
To flip Drupal font awesome icon horizontally and vertically use fa-flip-horizontal and fa-flip-vertical classes.
<div>
<i class='fab fa-drupal fa-3x'>F</i> Normal <br>
<i class='fab fa-drupal fa-flip-horizontal fa-3x'>F</i> fa-flip-horizontal<br>
<i class='fab fa-drupal fa-flip-vertical fa-3x'>F</i> fa-flip-vertical<br>
</div>
Output:
F fa-flip-horizontal
F fa-flip-vertical
Combine Drupal 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 Drupal 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-drupal fa-stack-1x'></i>
</span>
Drupal on fa-square<br>
<span class='fa-stack fa-lg'>
<i class='fas fa-circle fa-stack-2x'></i>
<i class='fab fa-drupal fa-stack-1x fa-inverse'></i>
</span>
Drupal on fa-circle<br>
<span class='fa-stack fa-lg'>
<i class='fab fa-drupal fa-stack-1x'></i>
<i class='fas fa-ban fa-stack-2x'></i>
</span>
Drupal on fa-ban
</div>
Output:
Drupal on fa-circle
Drupal on fa-ban
