Skip to content

Commit

Permalink
Fix icon optimize config (#10087)
Browse files Browse the repository at this point in the history
This was causing quite a bit of output in build scripts. Adding a width
and height to an icon then running yarn optimize confirms that this
still works
  • Loading branch information
kyledurand authored Aug 16, 2023
1 parent 5ecaafc commit 49f1257
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions polaris-icons/svgo.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
module.exports = {
plugins: [
'removeDimensions',
{
/**
* removeDimensions is set to true to remove width and height attributes from SVGs.
* This allows the SVG to scale to the size of its container, making it more responsive.
*/
name: 'removeDimensions',
active: true,
},
{
name: 'preset-default',
params: {
Expand All @@ -11,12 +18,6 @@ module.exports = {
*/
removeViewBox: false,

/**
* removeDimensions is set to true to remove width and height attributes from SVGs.
* This allows the SVG to scale to the size of its container, making it more responsive.
*/
removeDimensions: true,

/**
* The following 2 settings are disabled to reduce rendering inconsistency
* on Android. Android uses a subset of the SVG spec called SVG Tiny:
Expand Down

0 comments on commit 49f1257

Please sign in to comment.