react-fontawesome
react-fontawesome copied to clipboard
Setting background-color break styles.
Please see this screenshot:
My code is this:
import { faCircle } from '@fortawesome/pro-regular-svg-icons/faCircle';
<FontAwesomeIcon
className={myClassName}
icon={faCircle}
/>;
.myClassName {
background-color: white;
background-clip: content-box; // max small
}
The background color goes outside of the SVG.
How can I solve this style problem nicely? (without changing icon)
You're adding the background to the <svg>
element - you actually want to add it to the <path>
within it ;-)