The CSS property value linear-gradient()
seems only to be applicable for HTML elements and not for SVG. Citing MDN on this:
Don't be confused with CSS linear-gradient() as CSS gradients can only apply to HTML elements where SVG gradient can only apply to SVG elements.
As a solution, convert your gradient to a <linear-gradient>
element as follows:
.cIcon {
width: 48px;
height: 48px;
}
#idCrown path {
fill: url(#gradientCrown);
}
<svg id="idCrown" class="cIcon" viewBox="0 0 24 24">
<linearGradient id="gradientCrown" gradientTransform="rotate(120)">
<stop offset="0%" stop-color="#e2ad27" />
<stop offset="100%" stop-color="#daa520" />
</linearGradient>
<path
d="M5 16L3 5L8.5 10L12 4L15.5 10L21 5L19 16H5M19 19C19 19.6 18.6 20 18 20H6C5.4 20 5 19.6 5 19V18H19V19Z"
/>
</svg>