Closed nicothin closed 7 years ago
Hi @nicothin! I'm not sure what is the issue, because gulp-svgstore
doesn't rename viewBox
to lowercase.
Sorry This is the fault of cheerio.
@nicothin oh, you probably need parserOptions: { xmlMode: true }
there
@w0rm TNX!!!
For posterity and everyone reference here how to structure the options object, based on @w0rm solution:
.pipe(cheerio({
run: function ($) {
$('svg').attr('style', 'display:none');
},
parserOptions: { xmlMode: true }
}))
Bringing attributes to the lower case causes problems with resizing svg>use![image](https://cloud.githubusercontent.com/assets/3499680/26524128/01a36448-4332-11e7-9951-aa0f12147b2e.png)
If the attribute
viewBox
is written in lowercase, the resizing of the icon does not work