<table><tr><td style="">ndavis added a comment.
</td></tr></table><br /><div><div><p>I don't trust optimizers unless it's <tt style="background: #ebebeb; font-size: 13px;">scour</tt>. That's the only one I know of that doesn't seem to cause problems occasionally. Inkscape's Optimized SVG save option actually uses <tt style="background: #ebebeb; font-size: 13px;">scour</tt> to do the optimization.</p>

<p>I'm somewhat open to the idea of only requiring optimization at build time for the sake of making it easier for newbies to contribute, but I prefer reading optimized SVGs in patches because that makes it easier for me to spot mistakes. The massive quantity of noise that Inkscape puts into SVGs, even plain SVGs, is staggering. Maybe we could have something that cleans the SVGs when submitted for a patch? If it won't work with Phabricator, it might work with GitLab.</p>

<blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/T11950#206330" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">T11950#206330</a>, <a href="https://phabricator.kde.org/p/ngraham/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@ngraham</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>As far as I can tell, every single icon in the <tt style="background: #ebebeb; font-size: 13px;">icons-dark</tt> folder is identical to the other ones with the exception of having the colors in the stylesheet changed. Auto-generating these in CMake seems quite feasible.</p></div>
</blockquote>

<p>There are a few that can't be auto-generated that way (gradients don't work with stylesheets), so we should have some logic to avoid overwriting files that already exist. Then we can eliminate all the icons that only need to have their stylesheet changed while keeping the option to do Breeze Dark specific icons.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Optimization creates real problem - sometimes icons after optimizations become hard to edit, so less people want to do modifications.</p></blockquote>

<p>There are 2 main issues that Optimizers introduce (in order of severity):</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">That gradients that don't get their properties from another gradient that they reference can't be swapped, unless you unset and reset the fill of the object you want to change the gradient for. This seems like a bug in Inkscape.</li>
<li class="remarkup-list-item">That some optimizers combine paths with similar properties by default. This isn't a big deal if you know to go to <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Path</span></span><span style="color: #92969D;"> → </span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Break Apart</span></span></span> in Inkscape, but obviously not everyone is going to know Inkscape or SVGs very well. It's hard to say how much a new contributor should be expected to know about SVGs or Inkscape.<ul class="remarkup-list">
<li class="remarkup-list-item">Sometimes Break Apart causes objects to lose their properties and turn black. Usually not a big deal, it's very easy to fix, but not good for workflow.</li>
<li class="remarkup-list-item">I suppose we could just make sure we don't use any settings in the optimizer for combining paths.</li>
</ul></li>
</ul></div></div><br /><div><strong>TASK DETAIL</strong><div><a href="https://phabricator.kde.org/T11950">https://phabricator.kde.org/T11950</a></div></div><br /><div><strong>To: </strong>ngraham, ndavis<br /><strong>Cc: </strong>mglb, Frameworks, mart, trickyricky26, ndavis, VDG, ngraham, LeGast00n, cblack, konkinartem, ian, jguidon, hannahk, Ghost6, jraleigh, MrPepe, fbampaloukas, squeakypancakes, alexde, IohannesPetros, GB_2, michaelh, crozbo, firef, bruns, skadinna, aaronhoneycutt, mbohlender<br /></div>