// I haven't yet found a way to change the viewBox property with CSS. // However this Javascript solution works well: let mySVG = document.getElementById('svg'); mySVG.setAttribute("viewBox", "0 0 100 100");