Can someone please tell me why the version of this svg doesn't scale unless it's base64 encoded? Is there some way to control the size of the icon without it being base 64 encoded so that it can be scaled up or down without getting cropped?
.svg-test {
display: inline-block;
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='%23ff000' d='M27.987 4.122L17.849 14.126l8.73 8.616-4.046 3.993-8.731-8.616-8.985 8.868-4.164-4.109 8.986-8.867-9.626-9.5L4.059.517l9.627 9.5L23.823.013l4.164 4.109z'/%3e%3c/svg%3e");
width: 15px;
height: 15px;
background-position: center center;
background-repeat: no-repeat
background-size: contain;
}
.svg-test-base64 {
display: inline-block;
background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyNyI+CiAgICA8cGF0aCBmaWxsPSIjMDAwIiAgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMjcuOTg3IDQuMTIyTDE3Ljg0OSAxNC4xMjZsOC43MyA4LjYxNi00LjA0NiAzLjk5My04LjczMS04LjYxNi04Ljk4NSA4Ljg2OC00LjE2NC00LjEwOSA4Ljk4Ni04Ljg2Ny05LjYyNi05LjVMNC4wNTkuNTE3bDkuNjI3IDkuNUwyMy44MjMuMDEzbDQuMTY0IDQuMTA5eiIvPgo8L3N2Zz4K) center no-repeat;
width: 15px;
height: 15px;
background-size: contain;
}
<h4>Without Base64 Encoding</h4>
<span class="svg-test"></span>
<h4>With Base64 Encoding</h4>
<span class="svg-test-base64"></span>