my ultimate goal is displaying images on my webpage which I can easily adjust the color of.
Currently I am doing it with inline SVG; like so:
<a href="https://thechymera.tumblr.com">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewbox="0 0 100 100">
<path class="social" d="M 100,0 0,0 0,100 100,100 z M 71.028,79.925 c -2.886,1.358 -5.506,2.315 -7.848,2.865 -2.344,0.545 -4.877,0.819 -7.599,0.819 -3.092,0 -4.917,-0.388 -7.291,-1.166 -2.375,-0.784 -4.402,-1.902 -6.077,-3.337 -1.681,-1.447 -2.841,-2.986 -3.49,-4.612 -0.65,-1.628 -0.972,-3.99 -0.972,-7.082 l 0,-23.714 -9.187,0 0,-9.576 c 2.655,-0.861 5.736,-2.099 7.626,-3.708 1.899,-1.615 3.418,-3.547 4.564,-5.807 1.149,-2.255 1.938,-5.132 2.369,-8.62 l 9.618,0 0,15.642 15.635,0 0,12.071 -15.637,0 0,17.34 c 0,3.924 -0.051,6.185 0.366,7.297 0.413,1.106 1.447,2.255 2.574,2.919 1.498,0.898 3.207,1.346 5.132,1.346 3.425,0 6.832,-1.112 10.216,-3.338 l 0,10.665 0,-0.004 z"></path>
</a>
(And specifying my colors in a linked .css
file:
svg:hover .social { fill: #efa5d6; }
svg .social { fill: #b5b5b5; }
).
I get the d="<...>"
values by cat
ing my SVG files.
My complaint with this method is:
I do not load the image from an editable source. I cannot directly edit the HTML if I want to change details in my image. I either have to copy the path values into a new SVG file, or keep the exact corresponding SVG file on record. after I am done editing, I can't just rsync
and rely on the fact that my HTML is still pointing to the same file, rather I have to edit the HTML as well and paste the path value. This easily adds 2-1000 further steps to my workflow, which, for a trial-and-error designer such as myself is quite significant.
Is there anyway to keep the capabilities (shown above) and wide support offered by inline SVG without actually inlining the SVG, but rather loading it from a different location?