<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<symbol id="menu-white" viewBox="0 0 42 42">
<circle cx="20" cy="20" r="19" stroke="white" stroke-width="2"/>
<circle cx="19.5" cy="10.5" r="2.5" fill="var($color-white)"/>
<circle cx="19.5" cy="19.5" r="2.5" fill="var($color-white)"/>
<circle cx="19.5" cy="28.5" r="2.5" fill="var($color-white)"/>
</symbol>
</svg>
$color-white: #fff
$color-white
в svg? <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<symbol id="menu-white" viewBox="0 0 42 42">
<circle cx="20" cy="20" r="19" stroke="white" stroke-width="2"/>
<circle cx="19.5" cy="10.5" r="2.5" fill="#{$color-white}"/>
<circle cx="19.5" cy="19.5" r="2.5" fill="#{$color-white}"/>
<circle cx="19.5" cy="28.5" r="2.5" fill="#{$color-white}"/>
</symbol>
</svg>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" display="none">
<symbol id="menu-white" viewBox="0 0 42 42">
<circle cx="20" cy="20" r="19" stroke="white" stroke-width="2"/>
<circle cx="19.5" cy="10.5" r="2.5" fill="currentColor"/>
<circle cx="19.5" cy="19.5" r="2.5" fill="currentColor"/>
<circle cx="19.5" cy="28.5" r="2.5" fill="currentColor"/>
</symbol>
</svg>
<svg class="ico" width="42" height="42"><use xlink:href="#menu-white"/></svg>
$color-white: #fff;
.ico {
color: $color-white;
}
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<symbol id="menu-white" viewBox="0 0 42 42">
<circle cx="20" cy="20" r="19" stroke="white" stroke-width="2"/>
<g class="color-change">
<circle cx="19.5" cy="10.5" r="2.5" fill="currentColor"/>
<circle cx="19.5" cy="19.5" r="2.5" fill="currentColor"/>
<circle cx="19.5" cy="28.5" r="2.5" fill="currentColor"/>
</g>
</symbol>
</svg>
$color-white: #fff;
$color-not-white: #f00;
.ico {
color: $color-white;
}
.ico:hover {
color: $color-not-white;
}
<svg class="ico" viewBox="0 0 42 42" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<circle cx="20" cy="20" r="19" stroke="white" stroke-width="2" />
<g class="color-change">
<circle cx="19.5" cy="10.5" r="2.5" fill="currentColor" />
<circle cx="19.5" cy="19.5" r="2.5" fill="currentColor" />
<circle cx="19.5" cy="28.5" r="2.5" fill="currentColor" />
</g>
</svg>
$color-white: #fff;
$color-not-white: #f00;
.ico {
color: $color-white;
}
.color-change:hover {
color: $color-not-white;
}
fill="green"
при hover заливает все маленькие кружочки <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<symbol id="menu-white" viewBox="0 0 42 42">
<circle cx="20" cy="20" r="19" stroke="white" stroke-width="2"/>
<circle cx="19.5" cy="10.5" r="2.5" fill="currentColor"/>
<circle cx="19.5" cy="19.5" r="2.5" fill="currentColor"/>
<circle cx="19.5" cy="28.5" r="2.5" fill="currentColor"/>
</symbol>
</svg>
fill="var($color-white)"
<svg class="icon-svg">
<use xlink:href="sprite.svg#icon"></use>
</svg>
<svg>
<use xlink:href="https://www.site.ru/assets/img/sprite.svg#icon"></use>
</svg>
var icon = "\
<svg version=\"1.1\" xmlns=\"http:\\//www.w3.org/2000/svg\" xmlns:xlink=\"http:\\//www.w3.org/1999/xlink\">\
<symbol id=\"menu-white\" viewBox=\"0 0 42 42\">\
<circle cx=\"20\" cy=\"20\" r=\"19\" stroke=\"white\" stroke-width=\"2\"/>\
<circle cx=\"19.5\" cy=\"10.5\" r=\"2.5\" fill=\"currentColor\"/>\
<circle cx=\"19.5\" cy=\"19.5\" r=\"2.5\" fill=\"currentColor\"/>\
<circle cx=\"19.5\" cy=\"28.5\" r=\"2.5\" fill=\"currentColor\"/>\
</symbol>\
<\/svg>";
document.getElementById('svg-icon').innerHTML = icon;
<svg class="icon color-svg">
<use id="svg-icon" xlink:href="#menu-white"></use>
</svg>
<svg class="ico" viewBox="0 0 42 42" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<circle cx="20" cy="20" r="19" stroke="white" stroke-width="2" />
<g class="color-change">
<circle cx="19.5" cy="10.5" r="2.5" fill="currentColor" />
<circle cx="19.5" cy="19.5" r="2.5" fill="currentColor" />
<circle cx="19.5" cy="28.5" r="2.5" fill="currentColor" />
</g>
</svg>
.color-change:hover {
color: $color-not-white;
}
var icon = "\
<svg version=\"1.1\" xmlns=\"http:\\//www.w3.org/2000/svg\" xmlns:xlink=\"http:\\//www.w3.org/1999/xlink\">\
<symbol id=\"menu-white\" viewBox=\"0 0 42 42\">\
<circle cx=\"20\" cy=\"20\" r=\"19\" stroke=\"white\" stroke-width=\"2\"/>\
<circle cx=\"19.5\" cy=\"10.5\" r=\"2.5\" fill=\"currentColor\"/>\
<circle cx=\"19.5\" cy=\"19.5\" r=\"2.5\" fill=\"currentColor\"/>\
<circle cx=\"19.5\" cy=\"28.5\" r=\"2.5\" fill=\"currentColor\"/>\
</symbol>\
<\/svg>";
document.getElementById('svg-icon').innerHTML = icon;
var iconOne = "<circle cx=\"20\" cy=\"20\" r=\"19\" stroke=\"white\" stroke-width=\"2\" class=\"icon-big\"/>\
<circle cx=\"19.5\" cy=\"10.5\" r=\"2.5\" class=\"icon-small\"/>\
<circle cx=\"19.5\" cy=\"19.5\" r=\"2.5\" class=\"icon-small\"/>\
<circle cx=\"19.5\" cy=\"28.5\" r=\"2.5\" class=\"icon-small\"/>";
document.getElementById('svg-icon-one').innerHTML = iconOne;
var iconTwo = "<circle cx=\"20\" cy=\"20\" r=\"19\" stroke=\"white\" stroke-width=\"2\" class=\"icon-big\"/>\
<circle cx=\"19.5\" cy=\"10.5\" r=\"2.5\" class=\"icon-small\"/>\
<circle cx=\"19.5\" cy=\"19.5\" r=\"2.5\" class=\"icon-small\"/>\
<circle cx=\"19.5\" cy=\"28.5\" r=\"2.5\" class=\"icon-small\"/>";
document.getElementById('svg-icon-two').innerHTML = iconTwo;
<div class="icon" data-icon="menu-icon"></div>
), искала бы нужную разметку в JS и вставляла её. Так можно держать кучи иконок и не делать это вручную. Я этим заниматься не буду. var icon = [
{
menu-icon: "<circle cx=\"20\" cy=\"20\" r=\"19\" stroke=\"white\" stroke-width=\"2\" class=\"icon-big\"/>\
<circle cx=\"19.5\" cy=\"10.5\" r=\"2.5\" class=\"icon-small\"/>\
<circle cx=\"19.5\" cy=\"19.5\" r=\"2.5\" class=\"icon-small\"/>\
<circle cx=\"19.5\" cy=\"28.5\" r=\"2.5\" class=\"icon-small\"/>"
},
и т.д.
];
<div class="icon" data-icon="menu-icon"></div>
, то туда и добавится иконка <div class="icon" data-icon="menu-icon"></div>
<div class="icon" data-icon="footer-icon"></div>