I'm trying to recolor the stroke and fill of a simple SVG graphic, in this case a rotated ellipse. I've defined the SVG inline as a symbol and am using it in my code with a new class for each instance, so it can be styled differently.
The fill color of each shape is correctly styled, but the stroke style isn't showing up, it's default blue on both instances.
What obvious thing am I missing to style the stroke as well as the fill?
I have tested this in Chrome and Firefox on Linux.
Here's my test page:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<title>SVG Test</title>
<style type="text/css">
svg.symbol {
display: none;
}
.icon {
width: 100px;
height: 100px;
background-color: #AAAAAA;
}
.type1 {
fill: yellow;
stroke: #FF0000;
}
.type2 {
fill: green;
stroke: #00FF00;
}
</style>
</head>
<body>
<svg class="symbol">
<symbol id="my_symbol">
<g transform="translate(0 -540.36)"><ellipse class="oval" rx="284.4" ry="113.2" stroke="#04abfd" transform="matrix(.71176 -.70242 .71176 .70242 0 0)" cy="744" cx="-387.8" stroke-width="6" /></g>
</symbol>
</svg>
<svg class="icon" viewBox="0 0 512 512">
<use class="type1" xlink:href="#my_symbol" x="0" y="0"/>
</svg>
<svg class="icon" viewBox="0 0 512 512">
<use class="type2" xlink:href="#my_symbol" x="0" y="0"/>
</svg>
</body>
</html>