'use strict'; exports.type = 'perItem'; exports.active = false; exports.description = 'removes width and height in presence of viewBox'; /** * Remove width/height attributes when a viewBox attribute is present. * * @example * * ↓ * * * @param {Object} item current iteration item * @return {Boolean} if true, with and height will be filtered out * * @author Benny Schudel */ exports.fn = function(item) { if ( item.isElem('svg') && item.hasAttr('viewBox') ) { item.removeAttr('width'); item.removeAttr('height'); } };