Skip to content

Instantly share code, notes, and snippets.

@persand
Last active November 23, 2016 19:26
Show Gist options
  • Save persand/28abeaa77ad1a7ce62d9 to your computer and use it in GitHub Desktop.
Save persand/28abeaa77ad1a7ce62d9 to your computer and use it in GitHub Desktop.
Better Sketch SVG export with: defaults write com.bohemiancoding.sketch3 exportCompactSVG -bool yes
<!--
Example with:
defaults write com.bohemiancoding.sketch3 exportCompactSVG -bool yes
via: http://robots.thoughtbot.com/organized-workflow-for-svg
-->
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Check">
<g id="check">
<path d="M22.1304,0.3138 L9.46915862,16.2969429 L5.14915862,11.8226571 C4.8264,11.4875143 4.30171034,11.4875143 3.97895172,11.8226571 C3.65536552,12.1578 3.65536552,12.6995143 3.97895172,13.0346571 L8.94446897,18.1775143 C9.10005517,18.3386571 9.31026207,18.4286571 9.52957241,18.4286571 C9.80350345,18.4158 10.0211586,18.3018 10.1692966,18.1149429 L23.4106759,1.40065714 C23.700331,1.03465714 23.6490207,0.494657143 23.2956414,0.194657143 C22.9422621,-0.1062 22.4208828,-0.0530571429 22.1304,0.3138 Z" id="Fill-4407" fill="#00467E"></path>
<path d="M19.8741517,10.3974857 C19.4173241,10.3974857 19.0465655,10.7814857 19.0465655,11.2546286 L19.0465655,22.2860571 L1.66725517,22.2860571 L1.66725517,4.28605714 L14.4046345,4.28605714 C14.8622897,4.28605714 15.2322207,3.90205714 15.2322207,3.42891429 C15.2322207,2.95491429 14.8622897,2.57177143 14.4046345,2.57177143 L0.839668966,2.57177143 C0.382841379,2.57177143 0.0120827586,2.95491429 0.0120827586,3.42891429 L0.0120827586,23.1432 C0.0120827586,23.6163429 0.382841379,24.0003429 0.839668966,24.0003429 L19.8741517,24.0003429 C20.3309793,24.0003429 20.7017379,23.6163429 20.7017379,23.1432 L20.7017379,11.2546286 C20.7017379,10.7814857 20.3309793,10.3974857 19.8741517,10.3974857" id="Fill-4408" fill="#00ADEE"></path>
</g>
</g>
</g>
</svg>
<!--
Same example but without:
defaults write com.bohemiancoding.sketch3 exportCompactSVG -bool yes
-->
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.1.1 (8761) - http://www.bohemiancoding.com/sketch -->
<title>check</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Check" sketch:type="MSArtboardGroup">
<g id="check" sketch:type="MSLayerGroup">
<path d="M22.1304,0.3138 L9.46915862,16.2969429 L5.14915862,11.8226571 C4.8264,11.4875143 4.30171034,11.4875143 3.97895172,11.8226571 C3.65536552,12.1578 3.65536552,12.6995143 3.97895172,13.0346571 L8.94446897,18.1775143 C9.10005517,18.3386571 9.31026207,18.4286571 9.52957241,18.4286571 C9.80350345,18.4158 10.0211586,18.3018 10.1692966,18.1149429 L23.4106759,1.40065714 C23.700331,1.03465714 23.6490207,0.494657143 23.2956414,0.194657143 C22.9422621,-0.1062 22.4208828,-0.0530571429 22.1304,0.3138 Z" id="Fill-4407" fill="#00467E" sketch:type="MSShapeGroup"></path>
<path d="M19.8741517,10.3974857 C19.4173241,10.3974857 19.0465655,10.7814857 19.0465655,11.2546286 L19.0465655,22.2860571 L1.66725517,22.2860571 L1.66725517,4.28605714 L14.4046345,4.28605714 C14.8622897,4.28605714 15.2322207,3.90205714 15.2322207,3.42891429 C15.2322207,2.95491429 14.8622897,2.57177143 14.4046345,2.57177143 L0.839668966,2.57177143 C0.382841379,2.57177143 0.0120827586,2.95491429 0.0120827586,3.42891429 L0.0120827586,23.1432 C0.0120827586,23.6163429 0.382841379,24.0003429 0.839668966,24.0003429 L19.8741517,24.0003429 C20.3309793,24.0003429 20.7017379,23.6163429 20.7017379,23.1432 L20.7017379,11.2546286 C20.7017379,10.7814857 20.3309793,10.3974857 19.8741517,10.3974857" id="Fill-4408" fill="#00ADEE" sketch:type="MSShapeGroup"></path>
</g>
</g>
</g>
</svg>
@ruant
Copy link

ruant commented Sep 22, 2015

Do you have an solution to get rid of the Page-1 group?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment