Can we add border around the fontawesome icon using css?

Anil Maharjan picture Anil Maharjan · Mar 11, 2016 · Viewed 52.4k times · Source

I need to change the border width of the icon - fa-comment-o. Can we change the border-width size with css?

Answer

Red picture Red · Mar 7, 2017

Yes you can. Use a text-shadow:

.my-icon {
     text-shadow: 0 0 3px #000;
}

Or Also you can use webkit text stroke remember it only work with Chrome and Safari

CSS-Tricks example

-webkit-text-fill-color: white;
-webkit-text-stroke-width: 1px;
-webkit-text-stroke-color: black;