Hi there,
I use jekyll-minifier on some of my projects but when I put an svg tag as background image in a css file, the value of background-image, url(SVG) is minified too. Spaces between attributes and between points are removed and the data:image become invalide.
So
background-image: url('data:image/svg+xml,%3Csvg width="64" height="64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm0-2c3.314 0 6-2.686 6-6s-2.686-6-6-6-6 2.686-6 6 2.686 6 6 6zm33.414-6l5.95-5.95L45.95.636 40 6.586 34.05.636 32.636 2.05 38.586 8l-5.95 5.95 1.414 1.414L40 9.414l5.95 5.95 1.414-1.414L41.414 8zM40 48c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm0-2c3.314 0 6-2.686 6-6s-2.686-6-6-6-6 2.686-6 6 2.686 6 6 6zM9.414 40l5.95-5.95-1.414-1.414L8 38.586l-5.95-5.95L.636 34.05 6.586 40l-5.95 5.95 1.414 1.414L8 41.414l5.95 5.95 1.414-1.414L9.414 40z" fill="%239C92AC" fill-opacity="0.4" fill-rule="evenodd"/%3E%3C/svg%3E');
become
background-image:url('data:image/svg+xml,%3Csvgwidth="64"height="64"viewBox="006464"xmlns="http://www.w3.org/2000/svg"%3E%3Cpathd="M816c4.41808-3.5828-8s-3.582-8-8-8-83.582-883.582888zm0-2c3.31406-2.6866-6s-2.686-6-6-6-62.686-662.686666zm33.414-6l5.95-5.95L45.95.636406.58634.05.63632.6362.0538.5868l-5.955.951.4141.414L409.414l5.955.951.414-1.414L41.4148zM4048c4.41808-3.5828-8s-3.582-8-8-8-83.582-883.582888zm0-2c3.31406-2.6866-6s-2.686-6-6-6-62.686-662.686666zM9.41440l5.95-5.95-1.414-1.414L838.586l-5.95-5.95L.63634.056.58640l-5.955.951.4141.414L841.414l5.955.951.414-1.414L9.41440z"fill="%239C92AC"fill-opacity="0.4"fill-rule="evenodd"/%3E%3C/svg%3E');
Is there a way to avoid that ? Or can you do something about that, please ?
Hi there,
I use
jekyll-minifieron some of my projects but when I put an svg tag as background image in a css file, the value ofbackground-image,url(SVG)is minified too. Spaces between attributes and between points are removed and thedata:imagebecome invalide.So
become
Is there a way to avoid that ? Or can you do something about that, please ?