diff --git a/packages/material-ui-icons/builder.js b/packages/material-ui-icons/builder.js index 22ad01c8230ca6..61614a35b49956 100755 --- a/packages/material-ui-icons/builder.js +++ b/packages/material-ui-icons/builder.js @@ -110,8 +110,11 @@ async function worker({ svgPath, options, renameFilter, template }) { } const data = await fse.readFile(svgPath, { encoding: 'utf8' }); - const result = await svgo.optimize(data); + // Remove hardcoded color fill before optimizing so that empty groups are removed + const input = data.replace(/ fill="#010101"/g, ''); + + const result = await svgo.optimize(input); // Extract the paths from the svg string // Clean xml paths const paths = result.data @@ -122,7 +125,6 @@ async function worker({ svgPath, options, renameFilter, template }) { .replace(/xlink:href="#a"/g, '') .replace(/xlink:href="#c"/g, '') .replace(/xlink:href="#SVGID_[\d]*_"/g, '') - .replace(/fill="#010101" /g, '') .replace(/fill-opacity=/g, 'fillOpacity=') .replace(/]*0h24[^>]*>/g, '') .replace(/]*0H24[^>]*>/g, '') diff --git a/packages/material-ui-icons/src/AllOut.js b/packages/material-ui-icons/src/AllOut.js index aa63372cf11747..856b16a53ac3e4 100644 --- a/packages/material-ui-icons/src/AllOut.js +++ b/packages/material-ui-icons/src/AllOut.js @@ -2,5 +2,5 @@ import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( - + , 'AllOut'); diff --git a/packages/material-ui-icons/src/FiberManualRecord.js b/packages/material-ui-icons/src/FiberManualRecord.js index 8618fa3e123266..df655b0fccf91b 100644 --- a/packages/material-ui-icons/src/FiberManualRecord.js +++ b/packages/material-ui-icons/src/FiberManualRecord.js @@ -2,5 +2,5 @@ import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( - + , 'FiberManualRecord'); diff --git a/packages/material-ui-icons/src/FiberSmartRecord.js b/packages/material-ui-icons/src/FiberSmartRecord.js index ccc1fb57a8bee7..07b3208912758d 100644 --- a/packages/material-ui-icons/src/FiberSmartRecord.js +++ b/packages/material-ui-icons/src/FiberSmartRecord.js @@ -2,5 +2,5 @@ import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( - + , 'FiberSmartRecord'); diff --git a/packages/material-ui-icons/src/ScatterPlot.js b/packages/material-ui-icons/src/ScatterPlot.js index 09ce66d0b7880d..6b74ead97e3f68 100644 --- a/packages/material-ui-icons/src/ScatterPlot.js +++ b/packages/material-ui-icons/src/ScatterPlot.js @@ -2,5 +2,5 @@ import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( - + , 'ScatterPlot'); diff --git a/packages/material-ui-icons/src/StrikethroughS.js b/packages/material-ui-icons/src/StrikethroughS.js index 98f3e54436f86c..484b89f645888f 100644 --- a/packages/material-ui-icons/src/StrikethroughS.js +++ b/packages/material-ui-icons/src/StrikethroughS.js @@ -2,5 +2,5 @@ import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( - + , 'StrikethroughS');