Closed haustraliaer closed 10 years ago
I will set up a master .sketch file that includes all svg icons/assets, along with an export script to make updates a bit easier.
There is now a assets-master.sketch
file in the repo that includes the image assets we've generated so far (Git picks this up as a folder).
I have also added a gulp sketch
task which automatically exports assets to the app/assets/img
folder. This requires Sketch 3 & SketchTool to be installed locally.
Re-opening this because I forgot @haustraliaer still has to write the mixin for SVG background-image.
closed with https://github.com/hivewallet/hive-js/commit/27b406ded5c1ce001db3b8fd7a9925a501efb34b
Use the following mixin for icons - defining width, height, display property & url:
.my_icon {
@include icon(20px, 20px, block, '/assets/img/icon.svg');
}
I've been thinking about this for a while now and after checking the actual support for SVG in browsers (http://caniuse.com/#search=svg) - I've concluded that we should actually just use svg as background images (or indeed inline if it makes sense).
I'll modify my existing mixin for icons to have an argument for image URL and then @jenbennings can start pushing master assets to the img folder when/if they are ready. If we decide later on that it would be smarter to bundle the main icons as a single CSS file with inline data-URI svg then we can do that for production, but in development/beta I don't think it'll be necessary.