Styling SVG’s Height and Width

This is for using an inline SVG element with CSS. Say you want to make your SVG element, for instance a chevron, smaller and have less opacity.

CSS:

svg {
transform: scale(0.4);
}
svg path {
fill-opacity: 0.2;
}

SASS:

svg {
transform: scale(0.4);
path {
fill-opacity: 0.2;
}
}

Go wild.

Show your support

Clapping shows how much you appreciated Colin McDonald’s story.