fa-border

The fa-border class is used to place a border around an icon. For additional control there are CSS custom properties associated with the border that can be set:

Example

<i class="fas fa-chess-pawn fa-border"></i>
<i
class="fas fa-chess-pawn fa-border"
style="--fa-border-radius: 100%;--fa-border-color: red;"
></i>
<i
class="fas fa-chess-pawn fa-border"
style="--fa-border-width: 3px; --fa-border-color: black; --fa-border-style: dotted;"
></i>

Font Awesome Border Examples

Contributors

Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn Open Source on Codecademy