react-fontawesome icon indicating copy to clipboard operation
react-fontawesome copied to clipboard

Setting background-color break styles.

Open rockmandash opened this issue 5 years ago • 1 comments

Please see this screenshot:

image

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)

rockmandash avatar May 21 '19 09:05 rockmandash

You're adding the background to the <svg> element - you actually want to add it to the <path> within it ;-)

Rycochet avatar Jul 18 '19 11:07 Rycochet