I'm working with an SVG that is being displayed inline like this:
<div className="app-details__icon-large" dangerouslySetInnerHTML={{__html: svg }} />
. I specifically need to render it this way (not using an img
tag or as a background) in order to have the ability to style certain properties within the SVG. While I've been able to successfully style properties not defined within the SVG using CSS selectors, I'm running into issues when trying to set the height and width. The inline height/width properties are overriding my CSS settings. Is there a recommended approach for controlling the height and width of an SVG from CSS when the SVG already has its own dimensions set? Can this be achieved, or if not, what is considered best practice for resizing inline SVGs?