On hover change color on svg file - html

I have social svg buttons . I need to change only background, but when I hover of "f" letter in facebook icon, it does not changes. Problem is that svg tag contains two figures inside. Here I recreate my problem https://codesandbox.io/s/smoosh-surf-bhrcu
.tours-full__content-social-links {
svg {
:hover {
&:first-child {
fill: #000000;
}
}
}
}
<svg width="52" height="53" viewBox="0 0 52 53" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="52" height="53" rx="26" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.0986 35.5403C18.806 36.8848 20.9952 36.8848 22.3404 35.5403Z" fill="#B8B8B8"/>
</svg>

You were close
svg {
&:hover {
:first-child {
fill: #000000;
}
}
}
which compiles to svg:hover :first-child {fill: #000000;}
When you hover the SVG as a whole, change the fill of the first path only.
svg:hover :first-child {
fill: #000000;
}
<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M26 52C40.3594 52 52 40.3594 52 26C52 11.6406 40.3594 0 26 0C11.6406 0 0 11.6406 0 26C0 40.3594 11.6406 52 26 52Z" fill="white"/>
<path d="M32.4351 12.0054L28.8373 12C24.7953 12 22.1832 14.5115 22.1832 18.3986V21.3488H18.5657C18.2531 21.3488 18 21.5863 18 21.8793V26.1538C18 26.4467 18.2534 26.6839 18.5657 26.6839H22.1832V37.4698C22.1832 37.7628 22.4363 38 22.7489 38H27.4686C27.7812 38 28.0343 37.7625 28.0343 37.4698V26.6839H32.264C32.5766 26.6839 32.8297 26.4467 32.8297 26.1538L32.8314 21.8793C32.8314 21.7386 32.7717 21.6039 32.6658 21.5044C32.5598 21.4048 32.4155 21.3488 32.2654 21.3488H28.0343V18.8479C28.0343 17.6459 28.34 17.0357 30.0109 17.0357L32.4346 17.0348C32.7469 17.0348 33 16.7974 33 16.5047V12.5356C33 12.2432 32.7472 12.006 32.4351 12.0054Z" fill="#B8B8B8"/>
</svg>

I tried adding class to the path and using that class to hover it. check snippet.
body {
font-family: sans-serif;
background: #d1d1d1;
}
.icon:hover {
fill: #000;
}
<div class="tours-full__content-sidebar-social">
<a href="#" class="tours-full__content-social-links">
<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg">
<path class="icon" fill-rule="evenodd" clip-rule="evenodd" d="M26 52C40.3594 52 52 40.3594 52 26C52 11.6406 40.3594 0 26 0C11.6406 0 0 11.6406 0 26C0 40.3594 11.6406 52 26 52Z" fill="white"/>
<path d="M32.4351 12.0054L28.8373 12C24.7953 12 22.1832 14.5115 22.1832 18.3986V21.3488H18.5657C18.2531 21.3488 18 21.5863 18 21.8793V26.1538C18 26.4467 18.2534 26.6839 18.5657 26.6839H22.1832V37.4698C22.1832 37.7628 22.4363 38 22.7489 38H27.4686C27.7812 38 28.0343 37.7625 28.0343 37.4698V26.6839H32.264C32.5766 26.6839 32.8297 26.4467 32.8297 26.1538L32.8314 21.8793C32.8314 21.7386 32.7717 21.6039 32.6658 21.5044C32.5598 21.4048 32.4155 21.3488 32.2654 21.3488H28.0343V18.8479C28.0343 17.6459 28.34 17.0357 30.0109 17.0357L32.4346 17.0348C32.7469 17.0348 33 16.7974 33 16.5047V12.5356C33 12.2432 32.7472 12.006 32.4351 12.0054Z" fill="#B8B8B8"/>
</svg>
</a>
<a href="#" class="tours-full__content-social-links">
<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg">
<path class="icon" fill-rule="evenodd" clip-rule="evenodd" d="M26 52C40.3594 52 52 40.3594 52 26C52 11.6406 40.3594 0 26 0C11.6406 0 0 11.6406 0 26C0 40.3594 11.6406 52 26 52Z" fill="white"/>
<path d="M40 17.6045C39.0331 18.0462 38.0029 18.3389 36.9287 18.4811C38.0337 17.794 38.8771 16.7143 39.2736 15.4129C38.2434 16.0526 37.1059 16.5045 35.8936 16.7566C34.9154 15.6718 33.5211 15 32.0001 15C29.0491 15 26.6734 17.4945 26.6734 20.5525C26.6734 20.9925 26.7091 21.4155 26.7969 21.8183C22.3655 21.5932 18.4444 19.3814 15.8103 16.012C15.3504 16.8429 15.0806 17.794 15.0806 18.8178C15.0806 20.7403 16.0312 22.4445 17.4483 23.4311C16.5919 23.4142 15.7517 23.1552 15.04 22.7474C15.04 22.7643 15.04 22.7863 15.04 22.8083C15.04 25.5058 16.8876 27.7465 19.3105 28.2626C18.8766 28.3862 18.4037 28.4454 17.913 28.4454C17.5718 28.4454 17.2273 28.4251 16.9039 28.3506C17.5945 30.5489 19.5542 32.1651 21.8845 32.2175C20.071 33.6949 17.7684 34.5851 15.2756 34.5851C14.8385 34.5851 14.4193 34.5648 14 34.5089C16.3611 36.0946 19.1594 37 22.177 37C31.9855 37 37.348 28.5385 37.348 21.204C37.348 20.9586 37.3399 20.7217 37.3285 20.4865C38.3864 19.7046 39.2752 18.7282 40 17.6045Z" fill="#B8B8B8"/>
</svg>
</a>
<a href="#" class="tours-full__content-social-links">
<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg">
<path class="icon" fill-rule="evenodd" clip-rule="evenodd" d="M26 52C40.3594 52 52 40.3594 52 26C52 11.6406 40.3594 0 26 0C11.6406 0 0 11.6406 0 26C0 40.3594 11.6406 52 26 52Z" fill="white"/>
<path d="M38.8621 33.6435C38.8306 33.5795 38.8013 33.5264 38.774 33.4838C38.3229 32.7171 37.4609 31.7759 36.1884 30.6601L36.1615 30.6346L36.1481 30.6221L36.1345 30.6092H36.1208C35.5433 30.0896 35.1776 29.7403 35.0245 29.5614C34.7442 29.2207 34.6815 28.8759 34.8346 28.5264C34.9428 28.2624 35.3492 27.7048 36.053 26.853C36.4231 26.4015 36.7163 26.0397 36.9328 25.7671C38.4942 23.808 39.1711 22.5561 38.9634 22.011L38.8828 21.8836C38.8286 21.8069 38.6887 21.7367 38.4634 21.6727C38.2375 21.6089 37.9488 21.5983 37.5967 21.6409L33.6981 21.6663C33.635 21.6452 33.5448 21.6471 33.4273 21.6727C33.31 21.6983 33.2513 21.7112 33.2513 21.7112L33.1834 21.7432L33.1295 21.7816C33.0844 21.807 33.0348 21.8517 32.9806 21.9156C32.9267 21.9793 32.8816 22.054 32.8455 22.1392C32.4211 23.1698 31.9385 24.128 31.3969 25.0137C31.063 25.5419 30.7563 25.9996 30.4762 26.3872C30.1965 26.7746 29.9619 27.06 29.7725 27.243C29.5828 27.4262 29.4117 27.5729 29.2579 27.6837C29.1045 27.7946 28.9873 27.8415 28.9062 27.8243C28.8249 27.8072 28.7483 27.7902 28.6758 27.7732C28.5495 27.6965 28.448 27.5922 28.3714 27.4602C28.2945 27.3282 28.2427 27.162 28.2156 26.9619C28.1887 26.7616 28.1728 26.5893 28.1682 26.4444C28.164 26.2998 28.1659 26.0951 28.1751 25.8311C28.1845 25.567 28.1887 25.3882 28.1887 25.2945C28.1887 24.9708 28.1954 24.6195 28.2088 24.2405C28.2225 23.8615 28.2335 23.5612 28.2428 23.3399C28.252 23.1185 28.2562 22.8842 28.2562 22.6372C28.2562 22.3902 28.2403 22.1965 28.2088 22.0559C28.1777 21.9154 28.13 21.7791 28.067 21.647C28.0037 21.515 27.9111 21.4129 27.7895 21.3404C27.6677 21.268 27.5163 21.2105 27.3361 21.1678C26.8577 21.0657 26.2486 21.0104 25.5084 21.0018C23.8299 20.9848 22.7513 21.0871 22.273 21.3086C22.0835 21.4021 21.912 21.53 21.7587 21.6917C21.5962 21.8791 21.5735 21.9814 21.6908 21.9983C22.2324 22.0748 22.6158 22.258 22.8414 22.5475L22.9227 22.701C22.986 22.8117 23.0492 23.0077 23.1124 23.2887C23.1755 23.5697 23.2162 23.8806 23.2341 24.2211C23.2792 24.843 23.2792 25.3753 23.2341 25.8181C23.1889 26.2611 23.1463 26.606 23.1055 26.853C23.0648 27.1 23.0039 27.3002 22.9227 27.4535C22.8414 27.6068 22.7873 27.7005 22.7602 27.7345C22.7331 27.7685 22.7106 27.7899 22.6926 27.7983C22.5753 27.8407 22.4533 27.8624 22.3271 27.8624C22.2006 27.8624 22.0473 27.8027 21.8668 27.6834C21.6864 27.5641 21.4992 27.4002 21.3051 27.1915C21.111 26.9827 20.8922 26.691 20.6484 26.3163C20.4049 25.9416 20.1521 25.4987 19.8904 24.9877L19.6739 24.6171C19.5385 24.3787 19.3536 24.0315 19.1189 23.5759C18.8841 23.1202 18.6766 22.6793 18.4962 22.2535C18.4241 22.0746 18.3157 21.9384 18.1714 21.8447L18.1036 21.8063C18.0586 21.7723 17.9863 21.7362 17.8871 21.6977C17.7877 21.6593 17.6841 21.6317 17.5757 21.6147L13.8665 21.6401C13.4875 21.6401 13.2303 21.7212 13.0949 21.883L13.0407 21.9596C13.0137 22.0022 13 22.0704 13 22.1641C13 22.2578 13.0271 22.3728 13.0813 22.509C13.6227 23.71 14.2116 24.8683 14.8478 25.9841C15.484 27.0998 16.0368 27.9986 16.506 28.6795C16.9753 29.361 17.4536 30.0042 17.9409 30.6087C18.4283 31.2135 18.7509 31.6011 18.9088 31.7713C19.0668 31.9419 19.1909 32.0694 19.2811 32.1546L19.6196 32.4612C19.8362 32.6656 20.1543 32.9105 20.5739 33.1957C20.9937 33.4812 21.4584 33.7622 21.9683 34.0392C22.4783 34.3158 23.0716 34.5415 23.7485 34.7161C24.4253 34.8908 25.0841 34.961 25.7249 34.9271H27.2817C27.5975 34.9014 27.8367 34.8077 27.9992 34.646L28.0531 34.5819C28.0893 34.5311 28.1232 34.4521 28.1545 34.3459C28.1862 34.2394 28.2019 34.1221 28.2019 33.9945C28.1927 33.6284 28.2222 33.2984 28.2897 33.0045C28.3572 32.7108 28.4341 32.4894 28.5201 32.3402C28.6061 32.1912 28.7031 32.0655 28.8111 31.9635C28.9193 31.8614 28.9964 31.7995 29.0416 31.7782C29.0865 31.7567 29.1224 31.7422 29.1495 31.7335C29.3661 31.6654 29.621 31.7313 29.9146 31.9317C30.2079 32.1318 30.4831 32.379 30.7404 32.6727C30.9977 32.9667 31.3067 33.2965 31.6676 33.6627C32.0288 34.029 32.3446 34.3013 32.6152 34.4804L32.8858 34.6337C33.0666 34.736 33.3012 34.8297 33.5901 34.9149C33.8784 35 34.131 35.0213 34.3479 34.9787L37.8133 34.9277C38.1561 34.9277 38.4228 34.8742 38.612 34.7679C38.8015 34.6614 38.9141 34.5441 38.9504 34.4166C38.9867 34.2888 38.9886 34.144 38.9573 33.982C38.9252 33.8204 38.8936 33.7074 38.8621 33.6435Z" fill="#B8B8B8"/>
</svg>
</a>
<a href="#" class="tours-full__content-social-links">
<svg width="52" height="53" viewBox="0 0 52 53" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect class="icon" width="52" height="53" rx="26" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.0986 30.6595L36.9794 25.7802C39.6735 23.0855 39.6735 18.7159 36.9794 16.0212C34.284 13.3263 29.9151 13.3263 27.2197 16.0212L23.5224 19.7183C24.9991 19.5019 26.5161 19.6493 27.9241 20.1976L29.6591 18.4606C31.0053 17.1154 33.1938 17.1154 34.5384 18.4606C35.8847 19.8058 35.8847 21.9944 34.5384 23.3406L29.6591 28.2197C28.3146 29.5642 26.1255 29.5661 24.7802 28.2197C24.3589 27.7984 24.0852 27.2913 23.9284 26.7556C23.904 26.7697 23.8794 26.7834 23.8547 26.7971C23.751 26.8546 23.6474 26.9122 23.5603 27L21.2925 29.2677C21.584 29.7594 21.916 30.2363 22.3404 30.6595C25.0347 33.3549 29.4048 33.3549 32.0986 30.6595ZM22.3404 35.5403L24.0767 33.8033C25.4835 34.3505 27.0009 34.4992 28.4784 34.2815L24.7801 37.9795C22.0853 40.6735 17.7159 40.6735 15.021 37.9795C12.3263 35.284 12.3263 30.9157 15.021 28.22L19.9001 23.3407C22.595 20.6459 26.9654 20.6459 29.659 23.3407C30.0836 23.7644 30.4173 24.2395 30.707 24.7332L28.4393 27C28.3539 27.0855 28.2537 27.1412 28.1521 27.1976C28.1254 27.2124 28.0987 27.2272 28.0722 27.2427C27.9139 26.7077 27.6399 26.2007 27.2196 25.7803C25.8744 24.4342 23.6867 24.4342 22.3404 25.7803L17.4605 30.6595C16.1152 32.0053 16.1152 34.1939 17.4605 35.5403C18.806 36.8848 20.9952 36.8848 22.3404 35.5403Z" fill="#B8B8B8"/>
</svg>
</a>
</div>

You can have the hover effect to last child instead of first
Updated link - codesandbox
.tours-full__content-social-links {
svg {
:hover {
&:last-child {
fill: #000000;
}
}
}
}

Related

SVG foreignObject form not showing

I'm trying to build a contact form inside svg shape. It is a pretty complicated shape exported from Corel Draw. But <foreignObject> is not showing at all. I'm using Chrome.
Here is my code
.str0 {stroke:#EBEBEB;stroke-width:15.4479}
.str2 {stroke:#ED174A;stroke-width:686.579}
.str1 {stroke:#ABD4EC;stroke-width:51.4929;stroke-dasharray:51.492915 154.478745}
.fil1 {fill:none}
.fil0 {fill:#EBECEC}
.fil3 {fill:#001F49}
.fil2 {fill:#8BC1FF}
.fil4 {fill:#FEFEFE;fill-rule:nonzero}
svg{
width:800px;
display: block;
margin:0 auto;
}
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" height="131.927mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
viewBox="0 0 35594 26745"
xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="Layer_x0020_1">
<g class="inputy">
<circle class="fil0 str0" cx="17993" cy="13373" r="11000"/>
<foreignObject x="50" y="50" width="200" height="150">
<body xmlns="http://www.w3.org/1999/xhtml">
<form>
<input type="text"/>
<input type="text"/>
</form>
</body>
</foreignObject>
</g>
<circle class="fil1 str1" cx="17859" cy="13507" r="12018"/>
<circle class="fil1 str2" cx="17993" cy="13373" r="13029"/>
<path class="fil2" d="M11512 12715l-9970 -5756c-2056,3562 -2056,7950 0,11512l9970 -5756z"/>
<path class="fil4" d="M650 11499l342 0c75,0 130,18 167,53 37,35 56,86 56,152 0,67 -20,120 -61,158 -40,38 -102,57 -185,57l-113 0 0 246 -206 0 0 -666zm206 284l51 0c40,0 68,-7 84,-21 16,-14 24,-31 24,-53 0,-21 -7,-39 -21,-53 -14,-15 -40,-22 -79,-22l-59 0 0 149z"/>
<path id="1" class="fil4" d="M1329 11832c0,-109 30,-193 91,-254 61,-61 145,-91 253,-91 111,0 196,30 256,89 60,60 90,143 90,250 0,78 -13,141 -39,191 -26,50 -64,88 -114,116 -50,28 -111,42 -185,42 -75,0 -137,-12 -186,-36 -49,-24 -89,-62 -120,-114 -31,-52 -46,-116 -46,-194zm205 0c0,67 13,115 38,145 25,29 59,44 102,44 44,0 79,-14 103,-43 24,-29 36,-80 36,-155 0,-63 -13,-108 -38,-137 -25,-29 -60,-43 -103,-43 -42,0 -75,15 -100,44 -25,29 -38,78 -38,146z"/>
<path id="2" class="fil4" d="M2161 11499l342 0c75,0 130,18 167,53 37,35 56,86 56,152 0,67 -20,120 -61,158 -40,38 -102,57 -185,57l-113 0 0 246 -206 0 0 -666zm206 284l51 0c40,0 68,-7 84,-21 16,-14 24,-31 24,-53 0,-21 -7,-39 -21,-53 -14,-15 -40,-22 -79,-22l-59 0 0 149z"/>
<polygon id="3" class="fil4" points="2820,11499 3445,11499 3445,11663 3235,11663 3235,12164 3030,12164 3030,11663 2820,11663 "/>
<path id="4" class="fil4" d="M3980 12054l-233 0 -33 110 -210 0 251 -666 225 0 249 666 -215 0 -33 -110zm-44 -144l-73 -239 -73 239 146 0zm-77 -588l159 0 -147 136 -88 0 76 -136z"/>
<polygon id="5" class="fil4" points="4261,11499 4476,11499 4626,11978 4774,11499 4983,11499 4735,12164 4513,12164 "/>
<polygon id="6" class="fil4" points="5083,11499 5288,11499 5288,11750 5504,11499 5777,11499 5534,11749 5789,12164 5536,12164 5395,11891 5288,12002 5288,12164 5083,12164 "/>
<path id="7" class="fil4" d="M5831 11832c0,-109 30,-193 91,-254 61,-61 145,-91 253,-91 111,0 196,30 256,89 60,60 90,143 90,250 0,78 -13,141 -39,191 -26,50 -64,88 -114,116 -50,28 -111,42 -185,42 -75,0 -137,-12 -186,-36 -49,-24 -89,-62 -120,-114 -31,-52 -46,-116 -46,-194zm205 0c0,67 13,115 38,145 25,29 59,44 102,44 44,0 79,-14 103,-43 24,-29 36,-80 36,-155 0,-63 -13,-108 -38,-137 -25,-29 -60,-43 -103,-43 -42,0 -75,15 -100,44 -25,29 -38,78 -38,146z"/>
<polygon id="8" class="fil4" points="6560,11499 6774,11499 6924,11978 7072,11499 7281,11499 7034,12164 6811,12164 "/>
<path id="9" class="fil4" d="M7314 11499l228 0 135 224 134 -224 227 0 -258 387 0 279 -206 0 0 -279 -259 -387zm356 -176l159 0 -147 136 -88 0 76 -136z"/>
<polygon id="10" class="fil4" points="652,13203 1160,13203 1160,13346 858,13346 858,13462 1117,13462 1117,13597 858,13597 858,13869 652,13869 "/>
<path id="11" class="fil4" d="M1278 13536c0,-109 30,-193 91,-254 61,-61 145,-91 253,-91 111,0 196,30 256,89 60,60 90,143 90,250 0,78 -13,141 -39,191 -26,50 -64,88 -114,116 -50,28 -111,42 -185,42 -75,0 -137,-12 -186,-36 -49,-24 -89,-62 -120,-114 -31,-52 -46,-116 -46,-194zm205 0c0,67 13,115 38,145 25,29 59,44 102,44 44,0 79,-14 103,-43 24,-29 36,-80 36,-155 0,-63 -13,-108 -38,-137 -25,-29 -60,-43 -103,-43 -42,0 -75,15 -100,44 -25,29 -38,78 -38,146z"/>
<path id="12" class="fil4" d="M2114 13869l0 -666 343 0c64,0 112,5 146,16 34,11 61,31 81,61 21,30 31,66 31,108 0,37 -8,69 -24,96 -16,27 -37,49 -65,65 -18,11 -42,19 -72,26 24,8 42,16 53,24 7,5 18,17 33,35 14,18 24,32 29,41l100 192 -232 0 -110 -203c-14,-26 -26,-43 -37,-51 -15,-10 -32,-15 -51,-15l-18 0 0 270 -206 0zm206 -395l87 0c9,0 28,-3 55,-9 14,-3 25,-10 33,-21 9,-11 13,-24 13,-39 0,-22 -7,-38 -20,-50 -14,-12 -39,-17 -77,-17l-90 0 0 136z"/>
<polygon id="13" class="fil4" points="2865,13203 3136,13203 3239,13608 3343,13203 3613,13203 3613,13869 3445,13869 3445,13361 3315,13869 3163,13869 3033,13361 3033,13869 2865,13869 "/>
<path id="14" class="fil4" d="M4210 13203l205 0 0 397c0,39 -6,76 -18,111 -12,35 -31,66 -58,92 -26,26 -54,44 -82,55 -40,15 -88,22 -144,22 -32,0 -68,-2 -106,-7 -38,-5 -70,-13 -96,-27 -26,-13 -49,-33 -71,-57 -21,-25 -36,-50 -44,-77 -13,-42 -19,-80 -19,-112l0 -397 205 0 0 406c0,36 10,65 30,85 20,20 48,31 84,31 35,0 63,-10 83,-30 20,-20 30,-48 30,-85l0 -406z"/>
<polygon id="15" class="fil4" points="4584,13203 4789,13203 4789,13705 5111,13705 5111,13869 4584,13869 "/>
<path id="16" class="fil4" d="M5646 13759l-233 0 -33 110 -210 0 251 -666 225 0 249 666 -215 0 -33 -110zm-44 -144l-73 -239 -73 239 146 0zm-77 -588l159 0 -147 136 -88 0 76 -136z"/>
<path id="17" class="fil4" d="M5995 13869l0 -666 343 0c64,0 112,5 146,16 34,11 61,31 81,61 21,30 31,66 31,108 0,37 -8,69 -24,96 -16,27 -37,49 -65,65 -18,11 -42,19 -72,26 24,8 42,16 53,24 7,5 18,17 33,35 14,18 24,32 29,41l100 192 -232 0 -110 -203c-14,-26 -26,-43 -37,-51 -15,-10 -32,-15 -51,-15l-18 0 0 270 -206 0zm206 -395l87 0c9,0 28,-3 55,-9 14,-3 25,-10 33,-21 9,-11 13,-24 13,-39 0,-22 -7,-38 -20,-50 -14,-12 -39,-17 -77,-17l-90 0 0 136zm164 -314l-131 0 -101 -130 112 0 55 70 55 -70 113 0 -104 130z"/>
<g id="odeslat">
<path class="fil3" d="M24081 12715l9970 -5756c2056,3562 2056,7950 0,11512l-9970 -5756z"/>
<g data-text="odeslat">
<path class="fil4" d="M28693 12321c0,-117 33,-208 98,-273 65,-65 156,-98 273,-98 119,0 211,32 276,96 65,64 97,154 97,269 0,84 -14,152 -42,206 -28,54 -69,95 -122,125 -53,30 -120,45 -199,45 -81,0 -148,-13 -201,-39 -53,-26 -96,-67 -129,-122 -33,-56 -49,-125 -49,-209zm221 0c0,72 14,124 40,156 27,32 64,47 110,47 48,0 85,-16 111,-46 26,-31 39,-86 39,-167 0,-67 -14,-117 -41,-148 -27,-31 -64,-47 -111,-47 -45,0 -81,16 -108,47 -27,32 -41,84 -41,157z"/>
<path id="1" class="fil4" d="M29593 11962l329 0c65,0 117,9 157,26 40,18 73,43 99,76 26,33 45,71 57,115 12,44 18,90 18,139 0,77 -9,136 -26,178 -17,42 -42,78 -73,106 -31,29 -64,48 -100,57 -49,13 -93,20 -132,20l-329 0 0 -717zm221 162l0 391 54 0c46,0 79,-5 99,-15 20,-10 35,-28 46,-54 11,-26 17,-67 17,-124 0,-76 -12,-128 -37,-156 -25,-28 -66,-42 -124,-42l-55 0z"/>
<polygon id="2" class="fil4" points="30404,11962 30997,11962 30997,12115 30626,12115 30626,12230 30970,12230 30970,12376 30626,12376 30626,12517 31008,12517 31008,12679 30404,12679 "/>
<path id="3" class="fil4" d="M31124 12442l210 -13c5,34 14,60 28,78 23,29 55,43 98,43 32,0 56,-7 73,-22 17,-15 26,-32 26,-52 0,-19 -8,-35 -24,-50 -16,-15 -54,-28 -113,-42 -97,-22 -166,-51 -208,-87 -42,-36 -63,-82 -63,-138 0,-37 11,-71 32,-104 21,-33 53,-59 96,-77 43,-19 102,-28 176,-28 92,0 161,17 209,51 48,34 77,88 86,163l-208 12c-6,-33 -17,-56 -35,-71 -18,-15 -42,-22 -74,-22 -26,0 -45,6 -58,16 -13,11 -20,24 -20,40 0,11 5,22 16,31 10,10 35,18 74,26 97,21 166,42 208,63 42,21 72,48 91,79 19,32 29,67 29,106 0,46 -13,88 -38,127 -26,39 -61,68 -107,88 -46,20 -103,30 -172,30 -122,0 -206,-24 -253,-70 -47,-47 -73,-106 -80,-179z"/>
<polygon id="4" class="fil4" points="31921,11962 32142,11962 32142,12503 32488,12503 32488,12679 31921,12679 "/>
<path id="5" class="fil4" d="M33065 12561l-251 0 -36 118 -226 0 270 -717 242 0 269 717 -232 0 -36 -118zm-47 -155l-78 -258 -79 258 157 0z"/>
<polygon id="6" class="fil4" points="33319,11962 33993,11962 33993,12139 33766,12139 33766,12679 33545,12679 33545,12139 33319,12139 "/>
</g>
</g>
</g>
</svg>
As you can see, the form with inputs is not showing. I tried adding xmlns:xhtml="http://www.w3.org/1999/xhtml" to svg. Starting tags with xhtml:. Adding xmlns="http://www.w3.org/1999/xhtml" directly to form. But none of these helped.
I don't know what else I could try.
Thank you for ideas.
This is a scale issue.
viewBox="0 0 35594 26745"
These numbers are very big. The inputs are there, but so small you can't see them. They're hidden in the top left of the svg.

How can I add text insde svg path?

I am trying to add a text inside svg path i copy from figma.
Here is how it's look in figma:
Here is my code base:
<svg width="185" height="89" viewBox="0 0 185 89" fill="none" xmlns="http://www.w3.org/2000/svg">
<text>hello</text>
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.87195 4.36808C5 6.07937 5 8.31958 5 12.8V27.4268L0.481487 32.6984C-0.160496 33.4474 -0.160496 34.5526 0.481487 35.3016L5 40.5732V76.2C5 80.6804 5 82.9206 5.87195 84.6319C6.63893 86.1372 7.86278 87.3611 9.36808 88.1281C11.0794 89 13.3196 89 17.8 89H172.2C176.68 89 178.921 89 180.632 88.1281C182.137 87.3611 183.361 86.1372 184.128 84.6319C185 82.9206 185 80.6804 185 76.2V12.8C185 8.31958 185 6.07937 184.128 4.36808C183.361 2.86278 182.137 1.63893 180.632 0.871948C178.921 0 176.68 0 172.2 0H17.8C13.3196 0 11.0794 0 9.36808 0.871948C7.86278 1.63893 6.63893 2.86278 5.87195 4.36808Z" fill="#E06956" />
</svg>
The main thing is to swap the order of the path and text elements so the text element is drawn on top of the path. After that you just need to position the text where you want it and ensure it has a fill colour so you can see it.
<svg width="185" height="89" viewBox="0 0 185 89" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M5.87195 4.36808C5 6.07937 5 8.31958 5 12.8V27.4268L0.481487 32.6984C-0.160496 33.4474 -0.160496 34.5526 0.481487 35.3016L5 40.5732V76.2C5 80.6804 5 82.9206 5.87195 84.6319C6.63893 86.1372 7.86278 87.3611 9.36808 88.1281C11.0794 89 13.3196 89 17.8 89H172.2C176.68 89 178.921 89 180.632 88.1281C182.137 87.3611 183.361 86.1372 184.128 84.6319C185 82.9206 185 80.6804 185 76.2V12.8C185 8.31958 185 6.07937 184.128 4.36808C183.361 2.86278 182.137 1.63893 180.632 0.871948C178.921 0 176.68 0 172.2 0H17.8C13.3196 0 11.0794 0 9.36808 0.871948C7.86278 1.63893 6.63893 2.86278 5.87195 4.36808Z" fill="#E06956" />
<text y="43" x="61" fill="white">hello</text>
</svg>

SVG not loading properly

I am simply trying to render the svg on the page however it is not loading.
<svg viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd"
stroke-linejoin="round" stroke-miterlimit="2">
<g transform="matrix(.48451 0 0 .60177 -438.2 27)">
<path fill="none" d="M906.2-44.5h55.3V0h-55.3z" />
<clipPath id="a">
<path d="M906.2-44.5h55.3V0h-55.3z" />
</clipPath>
<g clip-path="url(#a)">
<path
d="M928.5-.4v-5.8l6.3-3 6.3 3v5.5a33.8 33.8 0 01-12.6.3zM916-6.9A42.1 42.1 0 00927-1.6v1a33.4 33.4 0 01-12.5-5.7L916-7zm37.8.3A29.6 29.6 0 01942-1v-5.3l6.2-3 5.5 2.6zm-26-12.1l6.3 2.9v5.8l-6.3 3-6.3-3v-5.8l6.3-3zM907.4-16l6-2.7 6.3 2.9v5.8l-6.1 2.8c-2.9-2.5-5-5.4-6.2-8.8zm53.2-.3a21.4 21.4 0 01-6 8.9l-5.5-2.6v-5.8l6.3-3 5.2 2.5zm-12.3-12l6.2 3v5.8l-6.2 2.9-6.3-3v-5.8l6.3-3zm-13.5 0l6.3 3v5.8l-6.3 2.9-6.2-3v-5.8l6.2-3zm-27.5 0l6.1 3v5.8l-6.3 2.9a18.2 18.2 0 01.2-11.6zm52.2 10.4c.5-1.7.6-3 .6-4.6 0-1.7-.6-3.4-1-4.5l1.5-.7a17.1 17.1 0 01.2 10.5l-1.3-.7zm-31.8-20L934-35v5.8l-6.3 3-6.3-3V-35l6.3-3zm-13.8.2l5.8 2.7v5.8l-6.3 3-5.9-2.8a22 22 0 016.4-8.7zm40.4.3c2.8 2.5 5 5.4 6.2 8.7l-5.1 2.4-6.3-2.9V-35l5.2-2.4zM942-43.6c4.3 1 8.2 3 11.4 5.4l-5.1 2.4-6.3-3v-4.8zm-13.4-.6a34.7 34.7 0 0112.5.4v5l-6.3 3-6.2-3v-5.4zm-1.2 1.5c-2.3.5-4.6 1.2-6.1 2-1.6.6-4 2.1-5.1 3l-1.4-.6a30.1 30.1 0 0112.6-5.7v1.3z"
fill="#404040" />
</g>
</g>
</svg>
This is my SVG from my HTML, on the webpage it is loaded.
However it doesn't render to the page.
I should add I also have a width and height on the svg of 25px.
Maybe there is something on top the icon. Try with
svg {
width: 25px;
z-index: 200;
}
<clipPath id="b">
<path d="M712 0h39.1v23.6H712z"/>
</clipPath>
<g clip-path="url(#b)">
Id's for all components were the same. Ids need to be unique. Must have been a setting in Affinity Designer.
I hate weird Matrix conversions.
Your SVG is a soccerball, and I presume all that mumbo jumbo is to make it look round? It is not round!
I multiplied the path by 10 with: https://yqnn.github.io/svg-path-editor/
Made it a Relative path so positioning is all done with the first M225 444
adjusted viewBox
removed SVG mumbo jumbo
added <circle> for reference
Took some minutes to adjust to scale(1.08, 1.333) and position with M225 444
re-adjusted viewBox
<svg viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2">
<circle cx='50%' cy='50%' r='50%' fill='red'></circle>
<g transform="matrix(.48451 0 0 .60177 -438.2 27)">
<path fill="none" d="M906.2-44.5h55.3V0h-55.3z" />
<clipPath id="a">
<path d="M906.2-44.5h55.3V0h-55.3z" />
</clipPath>
<g clip-path="url(#a)">
<path d="M928.5-.4v-5.8l6.3-3 6.3 3v5.5a33.8 33.8 0 01-12.6.3zM916-6.9A42.1 42.1 0 00927-1.6v1a33.4 33.4 0 01-12.5-5.7L916-7zm37.8.3A29.6 29.6 0 01942-1v-5.3l6.2-3 5.5 2.6zm-26-12.1l6.3 2.9v5.8l-6.3 3-6.3-3v-5.8l6.3-3zM907.4-16l6-2.7 6.3 2.9v5.8l-6.1 2.8c-2.9-2.5-5-5.4-6.2-8.8zm53.2-.3a21.4 21.4 0 01-6 8.9l-5.5-2.6v-5.8l6.3-3 5.2 2.5zm-12.3-12l6.2 3v5.8l-6.2 2.9-6.3-3v-5.8l6.3-3zm-13.5 0l6.3 3v5.8l-6.3 2.9-6.2-3v-5.8l6.2-3zm-27.5 0l6.1 3v5.8l-6.3 2.9a18.2 18.2 0 01.2-11.6zm52.2 10.4c.5-1.7.6-3 .6-4.6 0-1.7-.6-3.4-1-4.5l1.5-.7a17.1 17.1 0 01.2 10.5l-1.3-.7zm-31.8-20L934-35v5.8l-6.3 3-6.3-3V-35l6.3-3zm-13.8.2l5.8 2.7v5.8l-6.3 3-5.9-2.8a22 22 0 016.4-8.7zm40.4.3c2.8 2.5 5 5.4 6.2 8.7l-5.1 2.4-6.3-2.9V-35l5.2-2.4zM942-43.6c4.3 1 8.2 3 11.4 5.4l-5.1 2.4-6.3-3v-4.8zm-13.4-.6a34.7 34.7 0 0112.5.4v5l-6.3 3-6.2-3v-5.4zm-1.2 1.5c-2.3.5-4.6 1.2-6.1 2-1.6.6-4 2.1-5.1 3l-1.4-.6a30.1 30.1 0 0112.6-5.7v1.3z" fill="#404040" />
</g>
</g>
</svg>
<!-- My Version: -->
<svg viewBox="0 0 600 600" xmlns="http://www.w3.org/2000/svg">
<circle cx='50%' cy='50%' r='50%' fill='green'></circle>
<path transform="scale(1.08, 1.333)" fill='#404040' d='M225 444v-58l63-30l63 30v55a338 338 90 01-126 3zm-125-65a421 421 90 00110 53v10a334 334 90 01-125-57l15-7zm378 3a296 296 90 01-118 56v-53l62-30l55 26zm-260-121l63 29v58l-63 30l-63-30v-58l63-30zm-204 27l60-27l63 29v58l-61 28c-29-25-50-54-62-88zm532-3a214 214 90 01-60 89l-55-26v-58l63-30l52 25zm-123-120l62 30v58l-62 29l-63-30v-58l63-30zm-135 0l63 30v58l-63 29l-62-30v-58l62-30zm-275 0l61 30v58l-63 29a182 182 90 012-116zm522 104c5-17 6-30 6-46c0-17-6-34-10-45l15-7a171 171 90 012 105l-13-7zm-318-200l63 29v58l-63 30l-63-30v-58l63-30zm-138 2l58 27v58l-63 30l-59-28a220 220 90 0164-87zm404 3c28 25 50 54 62 87l-51 24l-63-29v-58l52-24zm-123-62c43 10 82 30 114 54l-51 24l-63-30v-48zm-134-6a347 347 90 01125 4v50l-63 30l-62-30v-54zm-12 15c-23 5-46 12-61 20c-16 6-40 21-51 30l-14-6a301 301 90 01126-57v13z' />
</svg>
<style>
svg {
background: pink;
width:180px;
}
</style>

How to cut text on svg so that after a word was cut, it would be possible to see through that cut space

I have an SVG file that I found on the web and it has a text "AX DESIGN" and if I use that svg file in html and put it on top of, say, another div(which has background color of RED) then I can see div's background color through that AX DESIGN text area. I also wanted to add another text which is also possible to see through that text. What online tool can I use to achieve that? By the way here is that photo
<svg width="1145" height="1025" viewBox="0 0 1145 1025" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M1145 0H0V1025H1145V0ZM290.4 516.8L289.4 516.6C288.333 516.467 287.333 516.067 286.4 515.4C285.2 514.733 284.067 513.933 283 513C282.067 512.067 281.133 511 280.2 509.8C279.267 508.467 278.467 507.333 277.8 506.4C277.133 505.467 276.4 504.133 275.6 502.4C274.933 500.667 274.4 499.467 274 498.8C273.733 498 273.2 496.6 272.4 494.6C271.6 492.6 271.067 491.333 270.8 490.8L261.8 467.6C258.467 459.2 255 450.067 251.4 440.2L241.2 413.2C239.333 408.4 236.667 401.2 233.2 391.6C232.667 390.4 231.867 388.533 230.8 386C229.867 383.333 229.133 381.333 228.6 380L228.4 379.2L204.2 374C205.667 375.067 206.867 376.333 207.8 377.8C208.2 378.2 208.8 379.267 209.6 381L214.2 393.2L191.2 453.6L172.6 502.8C171.267 505.333 169.8 507.533 168.2 509.4C166.6 511.267 165.2 512.667 164 513.6C162.933 514.533 161.733 515.267 160.4 515.8C159.2 516.333 158.4 516.667 158 516.8H157V520H197V516.8H193.2C190.667 516.667 187.867 515.8 184.8 514.2C181.867 512.6 179.933 510.2 179 507C178.067 503.667 178.267 499.8 179.6 495.4L188.6 471.6L191.2 464.6H241.8L244.4 471.6L253.8 496.2C254.467 498.067 254.933 499.8 255.2 501.4C255.6 504.467 255.4 507.067 254.6 509.2C253.8 511.333 252.733 512.867 251.4 513.8C250.067 514.733 248.467 515.467 246.6 516C244.867 516.533 243.6 516.8 242.8 516.8H241.2V520H290.4V516.8ZM240.2 460.6H192.8L195.4 453.6L216.2 398.8L216.4 398.2L237.6 453.6L240.2 460.6ZM439.328 513.4C441.061 514.733 443.461 515.533 446.528 515.8V520H399.728V515.8L404.328 515.6C410.995 515.467 414.328 514.4 414.328 512.4C414.328 511.467 413.528 509.733 411.928 507.2L377.728 454.8L371.528 463.8C367.528 469.8 363.195 476.267 358.528 483.2C353.995 490.133 351.195 494.6 350.128 496.6L349.328 498.2C347.995 501.4 347.328 504 347.328 506C347.328 512.267 353.461 515.6 365.728 516V520H320.328V516C324.995 515.2 329.461 512.8 333.728 508.8C335.461 507.333 337.861 504.6 340.928 500.6L374.928 450.4L332.528 385.6C331.461 384 330.795 382.933 330.528 382.4C328.928 379.733 327.528 377.8 326.328 376.6C325.261 375.533 323.795 374.6 321.928 373.8H346.928L386.728 435L409.928 401.8C414.595 395.267 416.928 390.067 416.928 386.2C416.928 381.533 412.928 378.8 404.928 378H404.528H403.728H402.728H401.728C401.328 377.867 401.061 377.8 400.928 377.8V373.8H442.328V377.8C434.595 378.867 426.795 385.2 418.928 396.8L389.928 440L431.528 503.2V503.4C432.861 505.4 433.661 506.533 433.928 506.8C436.728 510.533 438.528 512.733 439.328 513.4ZM542.214 449C539.947 448.2 537.514 447.633 534.914 447.3C533.247 447.033 531.38 446.9 529.314 446.9H511.814H508.814H497.514V448.8H499.714C501.114 448.867 502.514 449.467 503.914 450.6C505.38 451.733 506.114 453.4 506.114 455.6V511.6C506.047 512.933 505.714 514.1 505.114 515.1C504.514 516.033 503.814 516.667 503.014 517C502.214 517.333 501.38 517.633 500.514 517.9C499.647 518.1 498.947 518.167 498.414 518.1C497.947 518.033 497.68 518.033 497.614 518.1V520H506.114H515.114H523.914C527.047 520 530.047 519.8 532.914 519.4C535.847 518.933 539.114 517.933 542.714 516.4C546.38 514.8 549.514 512.733 552.114 510.2C554.78 507.667 557.047 504.033 558.914 499.3C560.847 494.5 561.88 488.933 562.014 482.6C562.147 477.467 561.647 472.867 560.514 468.8C559.38 464.733 557.914 461.467 556.114 459C554.314 456.533 552.114 454.433 549.514 452.7C546.98 450.967 544.547 449.733 542.214 449ZM541.614 513.3C539.68 514.7 537.18 515.867 534.114 516.8C531.114 517.733 527.714 518.2 523.914 518.2C522.314 518.2 521.147 518.167 520.414 518.1C519.747 518.033 518.914 517.833 517.914 517.5C516.98 517.1 516.28 516.433 515.814 515.5C515.414 514.5 515.18 513.2 515.114 511.6V454.9C515.247 453.033 515.814 451.633 516.814 450.7C517.814 449.7 518.814 449.133 519.814 449C520.88 448.8 522.38 448.7 524.314 448.7H525.414C526.48 448.767 527.68 448.867 529.014 449C530.414 449.067 531.98 449.333 533.714 449.8C535.514 450.267 537.214 450.933 538.814 451.8C540.48 452.667 542.114 453.967 543.714 455.7C545.38 457.367 546.814 459.4 548.014 461.8C549.28 464.133 550.28 467.167 551.014 470.9C551.747 474.567 552.114 478.733 552.114 483.4C552.114 485.533 552.08 487.367 552.014 488.9C551.947 490.433 551.714 492.5 551.314 495.1C550.98 497.7 550.447 499.933 549.714 501.8C549.047 503.667 548.014 505.7 546.614 507.9C545.214 510.1 543.547 511.9 541.614 513.3ZM649.482 520V499.5H647.082C647.082 502.1 646.916 504.4 646.582 506.4C646.249 508.333 645.616 510.233 644.682 512.1C643.749 513.967 642.316 515.4 640.382 516.4C638.449 517.4 636.049 517.9 633.182 517.9H622.082C616.682 517.9 613.849 515.867 613.582 511.8V484.2H621.082C624.749 484.333 627.182 485.567 628.382 487.9C629.582 490.233 630.182 493.4 630.182 497.4H631.982V468.8H630.182C630.182 470.667 630.049 472.3 629.782 473.7C629.582 475.1 629.182 476.467 628.582 477.8C627.982 479.133 627.016 480.2 625.682 481C624.349 481.733 622.682 482.133 620.682 482.2H613.582V455.1C613.849 450.967 616.682 448.9 622.082 448.9H630.682C633.549 448.9 635.949 449.3 637.882 450.1C639.816 450.9 641.249 452.1 642.182 453.7C643.116 455.3 643.749 457 644.082 458.8C644.416 460.6 644.582 462.767 644.582 465.3H646.982V446.9H641.182H622.082H613.582H604.582H595.982V448.3L597.982 448.4C599.382 448.533 600.782 449.2 602.182 450.4C603.649 451.533 604.449 453.2 604.582 455.4V512C604.449 513.267 604.049 514.367 603.382 515.3C602.716 516.233 602.016 516.9 601.282 517.3C600.549 517.7 599.716 518.033 598.782 518.3C597.849 518.5 597.182 518.6 596.782 518.6H595.982V520H604.582H649.482ZM722.214 488.4C718.547 484.067 713.38 480.267 706.714 477C702.514 474.933 699.18 472.7 696.714 470.3C694.247 467.833 692.714 465.7 692.114 463.9C691.514 462.1 691.347 460.267 691.614 458.4C691.88 456.533 692.147 455.3 692.414 454.7C692.747 454.1 693.047 453.633 693.314 453.3C694.38 451.833 695.58 450.567 696.914 449.5C699.914 447.3 703.914 446.9 708.914 448.3C711.047 448.967 712.58 449.667 713.514 450.4C714.514 451.133 715.48 452.133 716.414 453.4C717.747 455.2 718.947 457.533 720.014 460.4C720.88 463.067 721.347 465.367 721.414 467.3H723.714V457.7L723.914 446H721.914L721.714 447.4C721.447 448.467 721.08 449.3 720.614 449.9C719.68 451.167 717.914 450.933 715.314 449.2C713.247 447.867 711.08 446.9 708.814 446.3C707.48 445.9 705.847 445.633 703.914 445.5H703.614C702.414 445.5 701.514 445.533 700.914 445.6C698.247 445.933 695.714 446.633 693.314 447.7C689.714 449.433 687.147 451.9 685.614 455.1C684.28 457.9 683.747 461.3 684.014 465.3L684.114 466.4C684.114 467.133 684.314 468.133 684.714 469.4C685.114 470.6 685.647 471.933 686.314 473.4C687.047 474.8 688.18 476.3 689.714 477.9C691.314 479.5 693.147 480.9 695.214 482.1C698.88 484.233 701.814 486.033 704.014 487.5C706.214 488.9 708.68 490.733 711.414 493C714.147 495.2 716.08 497.433 717.214 499.7C718.414 501.967 718.814 504.3 718.414 506.7C717.947 509.767 716.847 512.467 715.114 514.8C713.38 517.067 711.114 518.467 708.314 519C706.18 519.467 703.98 519.5 701.714 519.1C701.114 519.033 700.147 518.8 698.814 518.4C697.014 517.8 695.614 517.1 694.614 516.3C693.48 515.433 692.48 514.433 691.614 513.3C690.08 511.3 688.847 509 687.914 506.4C686.714 503.133 686.047 499.733 685.914 496.2V495.8H683.614L683.714 508.6L683.514 520.6H685.414L685.714 519.1C686.114 517.7 686.58 516.733 687.114 516.2C687.847 515.6 688.814 515.567 690.014 516.1C690.28 516.233 691.347 516.9 693.214 518.1C694.147 518.7 695.214 519.2 696.414 519.6C698.48 520.467 700.78 521 703.314 521.2C705.18 521.467 707.58 521.4 710.514 521C714.247 520.333 717.38 519.133 719.914 517.4C723.78 514.733 726.18 511.133 727.114 506.6C727.514 504.8 727.714 503.033 727.714 501.3C727.714 496.967 725.88 492.667 722.214 488.4ZM785.87 518.6H786.77V520H760.67V518.6L762.47 518.5C763.603 518.433 764.837 517.967 766.17 517.1C767.57 516.233 768.503 515 768.97 513.4C769.17 512.733 769.27 512.067 769.27 511.4V451.1C769.27 450.7 769.203 450.1 769.07 449.3C768.737 448.233 768.37 447.433 767.97 446.9L778.27 453.4V511.5C778.337 512.9 778.67 514.1 779.27 515.1C779.937 516.1 780.637 516.833 781.37 517.3C782.103 517.7 782.937 518.033 783.87 518.3C784.87 518.5 785.537 518.6 785.87 518.6ZM883.407 488.6C881.807 488.8 879.673 488.9 877.007 488.9H865.707L858.107 488.6V490.7C861.307 490.833 863.573 491.133 864.907 491.6C867.173 492.733 868.307 494.9 868.307 498.1L868.507 508.4V510.6V511.5C868.373 512.433 868.173 513.2 867.907 513.8C867.44 514.667 866.673 515.467 865.607 516.2L865.307 516.4C862.107 518.133 858.907 519.133 855.707 519.4H854.807C852.74 519.4 851.007 519.267 849.607 519C842.073 517.267 836.54 511.033 833.007 500.3C830.607 493.167 829.773 485.733 830.507 478C831.373 468.267 833.74 460.733 837.607 455.4C840.54 451.467 844.173 448.933 848.507 447.8C849.773 447.533 851.273 447.4 853.007 447.4C857.94 447.4 862.573 448.833 866.907 451.7C868.173 452.567 869.273 453.567 870.207 454.7C871.407 456.1 872.307 457.467 872.907 458.8C874.107 461.2 875.04 464.5 875.707 468.7C875.84 469.5 875.907 470.1 875.907 470.5V470.6H878.407V470.5V470.1C878.407 459.1 878.54 451.367 878.807 446.9H876.407V447.4L876.107 449.2C875.84 450.4 875.507 451.333 875.107 452C874.84 452.4 874.573 452.667 874.307 452.8C873.84 453.2 873.007 452.967 871.807 452.1C869.673 450.633 867.94 449.533 866.607 448.8C865.34 448 863.507 447.233 861.107 446.5C858.773 445.767 856.24 445.4 853.507 445.4C851.507 445.4 850.007 445.467 849.007 445.6C848.34 445.733 847.873 445.8 847.607 445.8C843.54 446.533 839.84 447.9 836.507 449.9C825.373 456.433 819.807 468.067 819.807 484.8C819.807 487.733 820.04 490.567 820.507 493.3C822.04 502.7 825.873 509.833 832.007 514.7C837.473 519.3 844.373 521.6 852.707 521.6H853.007C853.273 521.6 853.673 521.567 854.207 521.5H855.407C860.607 521.167 865.44 519.3 869.907 515.9C871.507 514.7 872.64 514.1 873.307 514.1C874.107 514.1 874.74 514.767 875.207 516.1C875.74 517.367 876.04 518.667 876.107 520H879.007L878.707 507L878.807 495.6V495.2C878.807 493.133 879.507 491.767 880.907 491.1C881.84 490.833 882.673 490.7 883.407 490.7V488.6ZM982.294 446.9H962.394V448.3L964.694 448.4C966.161 448.533 967.661 449.2 969.194 450.4C970.727 451.6 971.561 453.3 971.694 455.5V503.9L934.894 446.9H917.494V448.6H919.494C920.827 448.667 922.194 449.233 923.594 450.3C925.061 451.367 925.861 452.967 925.994 455.1V511.3C925.994 512.1 925.961 512.667 925.894 513C925.628 514.133 925.128 515.1 924.394 515.9C923.727 516.633 923.027 517.167 922.294 517.5C921.628 517.833 920.861 518.1 919.994 518.3C919.128 518.5 918.527 518.6 918.194 518.6H917.494V520H936.594V518.6L934.794 518.5C933.594 518.433 932.294 517.967 930.894 517.1C929.494 516.167 928.594 514.833 928.194 513.1C928.061 512.3 927.994 511.7 927.994 511.3V452.8L971.394 520H973.694V455.4C973.761 454 974.094 452.8 974.694 451.8C975.361 450.8 976.061 450.1 976.794 449.7C977.594 449.233 978.461 448.9 979.394 448.7C980.394 448.433 981.061 448.3 981.394 448.3H982.294V446.9Z" fill="#252424"/>
<defs>
<mask id="mymask">
<rect width="100%" height="100%" fill="white"/>
<text x="320" y="140" text-anchor="middle" font-size="40px" >Some transparent text</text>
<text x="320" y="190" text-anchor="middle" font-size="40px" >has been placed here</text>
<rect x="220" y="300" width="200" height="50" fill="black"/>
<text x="320" y="335" text-anchor="middle" fill="white" font-size="30px">BUTTON</text>
</mask>
</defs>
<rect fill="black" fill-opacity="0.7" width="100%" height="100%" mask="url(#mymask)"/>
</svg>
In SVG you can draw rectangle with a hole by drawing the rectangle in one direction and the hole the other way round.
<svg viewBox="0 0 100 50">
<path d="M0,0v50h100v-50h-100
M10,10h80v30h-80v-30"/>
</svg>
If for some reason you can't do that you can use fill-rule="evenodd"
<svg viewBox="0 0 100 50">
<path d="M0,00h100v50h-100v-50
M10,10h80v30h-80v-30" fill-rule="evenodd"/>
</svg>
Apparently this is what they are doing at axcapital. I suppose they used illustrator or another editor to draw the paths for the letters.
For example this is the code to draw the X:
svg{width:200px;}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="300 350 200 200" >
<path id="X" d="M439.328 513.4C441.061 514.733 443.461 515.533 446.528 515.8V520H399.728V515.8L404.328 515.6C410.995 515.467 414.328 514.4 414.328 512.4C414.328 511.467 413.528 509.733 411.928 507.2L377.728 454.8L371.528 463.8C367.528 469.8 363.195 476.267 358.528 483.2C353.995 490.133 351.195 494.6 350.128 496.6L349.328 498.2C347.995 501.4 347.328 504 347.328 506C347.328 512.267 353.461 515.6 365.728 516V520H320.328V516C324.995 515.2 329.461 512.8 333.728 508.8C335.461 507.333 337.861 504.6 340.928 500.6L374.928 450.4L332.528 385.6C331.461 384 330.795 382.933 330.528 382.4C328.928 379.733 327.528 377.8 326.328 376.6C325.261 375.533 323.795 374.6 321.928 373.8H346.928L386.728 435L409.928 401.8C414.595 395.267 416.928 390.067 416.928 386.2C416.928 381.533 412.928 378.8 404.928 378H404.528H403.728H402.728H401.728C401.328 377.867 401.061 377.8 400.928 377.8V373.8H442.328V377.8C434.595 378.867 426.795 385.2 418.928 396.8L389.928 440L431.528 503.2V503.4C432.861 505.4 433.661 506.533 433.928 506.8C436.728 510.533 438.528 512.733 439.328 513.4Z" fill="#252424"/>
</svg>
In order to make it a hole you need a path with a d attribute drawing first a rectangle M300,350h200v200h-200v-200 and next the X like so:
body{background:gold;}
svg{width:200px;}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="300 350 200 200" width="300" >
<path id="X" fill-rule="evenodd" d="
M300,350h200v200h-200v-200
M439.328 513.4C441.061 514.733 443.461 515.533 446.528 515.8V520H399.728V515.8L404.328 515.6C410.995 515.467 414.328 514.4 414.328 512.4C414.328 511.467 413.528 509.733 411.928 507.2L377.728 454.8L371.528 463.8C367.528 469.8 363.195 476.267 358.528 483.2C353.995 490.133 351.195 494.6 350.128 496.6L349.328 498.2C347.995 501.4 347.328 504 347.328 506C347.328 512.267 353.461 515.6 365.728 516V520H320.328V516C324.995 515.2 329.461 512.8 333.728 508.8C335.461 507.333 337.861 504.6 340.928 500.6L374.928 450.4L332.528 385.6C331.461 384 330.795 382.933 330.528 382.4C328.928 379.733 327.528 377.8 326.328 376.6C325.261 375.533 323.795 374.6 321.928 373.8H346.928L386.728 435L409.928 401.8C414.595 395.267 416.928 390.067 416.928 386.2C416.928 381.533 412.928 378.8 404.928 378H404.528H403.728H402.728H401.728C401.328 377.867 401.061 377.8 400.928 377.8V373.8H442.328V377.8C434.595 378.867 426.795 385.2 418.928 396.8L389.928 440L431.528 503.2V503.4C432.861 505.4 433.661 506.533 433.928 506.8C436.728 510.533 438.528 512.733 439.328 513.4Z" fill="#252424"/>
</svg>
Please observe that the path has fill-rule="evenodd".

SVGs are all rendering identical on rails

I'm trying to make a shared partial to render 3 SVG images, but when it goes to the browser it all looks like the 1st one.
Here's the code created:
<a href="">
<svg width="76" height="76" viewBox="0 0 76 76" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>GitHub</title>
<g id="Canvas" transform="translate(1493 741)">
<g id="Vector">
<use xlink:href="#path0_fill" transform="translate(-1493 -740.815)" fill="#2B34E3"/>
</g>
</g>
<defs>
<path id="path0_fill" fill-rule="evenodd" d="M 22.1444 38.5311C 22.0763 38.5311 22.8917 40.2542 22.9144 40.2542C 24.6943 43.4256 28.1252 45.3971 33.9128 45.9441C 33.0873 46.5592 32.0951 47.7265 31.9575 49.0752C 30.9186 49.7345 28.8295 49.9525 27.2062 49.4496C 24.9303 48.745 24.0593 44.3244 20.6524 44.9546C 19.9152 45.0895 20.0616 45.5672 20.6991 45.9744C 21.738 46.6336 22.715 47.4592 23.4686 49.2151C 24.048 50.5639 25.2648 52.9727 29.1148 52.9727C 30.6422 52.9727 31.7126 52.7924 31.7126 52.7924C 31.7126 52.7924 31.7417 56.2349 31.7417 57.5735C 31.7417 59.1176 29.6185 59.5525 29.6185 60.295C 29.6185 60.5887 30.3216 60.6164 30.8858 60.6164C 32.0017 60.6164 34.323 59.7025 34.323 58.0979C 34.323 56.8235 34.3445 52.5391 34.3445 51.7878C 34.3445 50.1492 35.2395 49.6298 35.2395 49.6298C 35.2395 49.6298 35.3505 58.3777 35.0261 59.5525C 34.6449 60.9315 33.957 60.7361 33.957 61.3513C 33.957 62.2664 36.7517 61.5769 37.6782 59.5664C 38.3939 58.0046 38.0809 49.4193 38.0809 49.4193L 38.8446 49.4042C 38.8446 49.4042 38.8875 53.3332 38.861 55.1294C 38.8345 56.9899 38.7057 59.342 39.8317 60.4513C 40.5714 61.1811 42.9672 62.4605 42.9672 61.2908C 42.9672 60.6113 41.6544 60.0529 41.6544 58.2139L 41.6544 49.7496C 42.7034 49.7496 42.5456 52.5328 42.5456 52.5328L 42.6226 57.7046C 42.6226 57.7046 42.3904 59.5878 44.6991 60.3756C 45.5133 60.6567 47.2552 60.7324 47.3373 60.2622C 47.4193 59.792 45.2394 59.0924 45.2192 57.6353C 45.2065 56.7441 45.2596 56.2248 45.2596 52.3576C 45.2596 48.4903 44.7307 47.0609 42.8864 45.9214C 48.5769 45.3479 52.0999 43.9664 53.8154 40.2668C 53.9492 40.2706 54.516 38.5387 54.4415 38.5387C 54.8265 37.142 55.0348 35.4895 55.0752 33.5332C 55.0651 28.2265 52.4774 26.3496 51.9813 25.4685C 52.7134 21.4513 51.8576 19.6235 51.4612 18.9958C 49.9944 18.484 46.3603 20.313 44.3734 21.6013C 41.1369 20.6723 34.2927 20.7618 31.7265 21.8408C 26.9916 18.5143 24.486 19.0235 24.486 19.0235C 24.486 19.0235 22.8665 21.871 24.0581 26.0382C 22.5004 27.987 21.3391 29.366 21.3391 33.0202C 21.3403 35.0798 21.5878 36.9227 22.1444 38.5311ZM 0 0L 75.7377 0L 75.7377 75.6303L 0 75.6303L 0 0Z"/>
</defs>
</svg>
</a>
<a href="">
<svg width="76" height="76" viewBox="0 0 76 76" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Twitter</title>
<g id="Canvas" transform="translate(1493 629)">
<g id="Vector">
<use xlink:href="#path0_fill" transform="translate(-1493 -628.63)" fill="#2B34E3"/>
</g>
</g>
<defs>
<path id="path0_fill" fill-rule="evenodd" d="M 43.1288 23.0458C 39.8229 24.2471 37.7338 27.3454 37.9711 30.7361L 38.0506 32.0445L 36.7277 31.8845C 31.9146 31.2706 27.7086 29.1882 24.1376 25.6891L 22.3918 23.9534L 21.9425 25.2353C 20.9907 28.0929 21.5991 31.1105 23.5822 33.1399C 24.64 34.2618 24.4014 34.4219 22.5774 33.7538C 21.9425 33.5408 21.3871 33.3807 21.334 33.4601C 21.1497 33.6479 21.7834 36.0769 22.2858 37.0387C 22.9738 38.3748 24.3749 39.6819 25.9099 40.4571L 27.2062 41.071L 25.6725 41.0975C 24.1919 41.0975 24.1389 41.1239 24.2979 41.6861C 24.8268 43.4218 26.9159 45.2647 29.2436 46.0664L 30.8833 46.6261L 29.4556 47.4807C 27.34 48.7109 24.8533 49.4042 22.3666 49.4559C 21.175 49.4824 20.1967 49.5895 20.1967 49.6702C 20.1967 49.9361 23.4244 51.4311 25.3014 52.0198C 30.935 53.7555 37.6277 53.0067 42.6529 50.0433C 46.224 47.9332 49.7937 43.7408 51.4612 39.6807C 52.3612 37.5189 53.26 33.566 53.26 31.6714C 53.26 30.4424 53.3395 30.2824 54.8202 28.8139C 55.6937 27.9592 56.5129 27.0252 56.672 26.758C 56.937 26.25 56.9093 26.25 55.5611 26.7038C 53.313 27.5055 52.9949 27.3983 54.107 26.1971C 54.9262 25.3424 55.9058 23.7933 55.9058 23.3395C 55.9058 23.2601 55.5094 23.3924 55.0588 23.6332C 54.5829 23.9004 53.5251 24.3013 52.7311 24.5408L 51.3034 24.9958L 50.007 24.1134C 49.2926 23.6332 48.2891 23.0987 47.7589 22.9387C 46.4095 22.5655 44.3457 22.6185 43.1288 23.0458ZM 0 0L 75.7377 0L 75.7377 75.6303L 0 75.6303L 0 0Z"/>
</defs>
</svg>
</a>
<a href="">
<svg width="76" height="76" viewBox="0 0 76 76" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Instagram</title>
<g id="Canvas" transform="translate(1493 853)">
<g id="instagram">
<use xlink:href="#path0_fill" transform="translate(-1493 -853)" fill="#2B34E3"/>
</g>
</g>
<defs>
<path id="path0_fill" fill-rule="evenodd" d="M 75.7377 0L 0 0L 0 75.6302L 75.7377 75.6302L 75.7377 0ZM 53.6281 22.0783C 54.6815 23.1304 55.3254 24.1824 55.8082 25.4244C 56.2765 26.6226 56.5984 27.9961 56.6862 30.0125C 56.7887 32.0289 56.8032 32.6718 56.8032 37.8152C 56.8032 42.9297 56.7743 43.594 56.6876 45.5841L 56.6875 45.587L 56.6862 45.6178C 56.5984 47.6196 56.2765 49.0078 55.8082 50.2059C 55.3254 51.4479 54.6815 52.4999 53.6281 53.552C 52.5745 54.604 51.521 55.2469 50.2772 55.7291C 49.0774 56.1967 47.7019 56.5182 45.6826 56.6058C 43.6633 56.7081 43.0195 56.7227 37.8689 56.7227C 32.7489 56.7227 32.0823 56.6938 30.0911 56.6074L 30.0897 56.6074L 30.0552 56.6058C 28.0505 56.5182 26.6604 56.1967 25.4606 55.7291C 24.2168 55.2469 23.1632 54.604 22.1097 53.552C 21.0562 52.4999 20.4124 51.4479 19.9294 50.2059C 19.4612 49.0078 19.1393 47.6342 19.0515 45.6178C 18.9491 43.6014 18.9344 42.9585 18.9344 37.8152C 18.9344 32.7018 18.9634 32.0366 19.0499 30.0476L 19.0515 30.0125C 19.1393 28.0107 19.4612 26.6226 19.9294 25.4244C 20.4124 24.1824 21.0562 23.1304 22.1097 22.0783C 23.1632 21.0263 24.2168 20.3834 25.4606 19.9012C 26.6604 19.4336 28.0359 19.1122 30.0552 19.0245C 32.0745 18.9222 32.7183 18.9076 37.8689 18.9076C 42.9889 18.9076 43.6555 18.9365 45.6467 19.0229L 45.6481 19.0229L 45.6826 19.0245C 47.6873 19.1122 49.0774 19.4336 50.2772 19.9012C 51.521 20.3834 52.5745 21.0263 53.6281 22.0783ZM 52.6184 48.9639C 52.8818 48.3064 53.1891 47.2982 53.2769 45.4571L 53.2794 45.3996C 53.3652 43.4576 53.3939 42.8073 53.3939 37.8152C 53.3939 32.8447 53.3654 32.1927 53.2805 30.2565L 53.2805 30.2554L 53.2804 30.2534L 53.2769 30.1732C 53.1891 28.3322 52.8818 27.3386 52.6184 26.6664C 52.2672 25.7751 51.8575 25.1468 51.1991 24.4893C 50.5405 23.8317 49.8967 23.408 49.0188 23.072C 48.3604 22.8089 47.3507 22.5021 45.507 22.4144C 43.517 22.3121 42.9025 22.2975 37.8542 22.2975C 32.873 22.2975 32.2228 22.3259 30.2805 22.4109L 30.2014 22.4144C 28.3578 22.5021 27.3628 22.8089 26.6897 23.072C 25.7971 23.4226 25.1678 23.8317 24.5094 24.4893C 23.851 25.1468 23.4266 25.7897 23.0901 26.6664C 22.8267 27.324 22.5194 28.3322 22.4316 30.1732C 22.3292 32.1604 22.3146 32.7741 22.3146 37.8152C 22.3146 42.7856 22.3431 43.4376 22.428 45.3738L 22.428 45.3749L 22.4281 45.377L 22.4316 45.4571C 22.5194 47.2982 22.8267 48.2917 23.0901 48.9639C 23.4413 49.8552 23.851 50.4835 24.5094 51.1411C 25.1678 51.7986 25.8118 52.2223 26.6897 52.5584C 27.3481 52.8214 28.3578 53.1282 30.2014 53.2159C 32.1914 53.3182 32.7914 53.3328 37.8542 53.3328C 42.8359 53.3328 43.4824 53.3045 45.4115 53.22L 45.507 53.2159C 47.3507 53.1282 48.3457 52.8214 49.0188 52.5584C 49.9114 52.2077 50.5405 51.7986 51.1991 51.1411C 51.8575 50.4835 52.2819 49.8406 52.6184 48.9639ZM 28.1237 37.8151C 28.1237 32.4526 32.4841 28.0983 37.8542 28.0983C 43.2244 28.0983 47.5848 32.4526 47.5848 37.8151C 47.5848 43.1776 43.2244 47.5319 37.8542 47.5319C 32.4841 47.5319 28.1237 43.1776 28.1237 37.8151ZM 31.5331 37.8151C 31.5331 41.3073 34.3717 44.1273 37.8542 44.1273C 41.3368 44.1273 44.1755 41.2927 44.1755 37.8151C 44.1755 34.3229 41.3514 31.5028 37.8542 31.5028C 34.3571 31.5028 31.5331 34.3375 31.5331 37.8151ZM 47.9652 29.9832C 49.2178 29.9832 50.2332 28.9692 50.2332 27.7184C 50.2332 26.4675 49.2178 25.4536 47.9652 25.4536C 46.7125 25.4536 45.6971 26.4675 45.6971 27.7184C 45.6971 28.9692 46.7125 29.9832 47.9652 29.9832Z"/>
</defs>
</svg>
</a>
As you can see all the SVGs are different, but when they are rendered they look like this:
Identical SVGs rendering
You must change the id to a unique name and properly reference it into xlink:href
<use xlink:href="#path1_fill" ...
<path id="path1_fill" fill-rule=...
<use xlink:href="#path2_fill" ...
<path id="path2_fill" fill-rule=...
https://jsfiddle.net/42qq7wLu/