//
// svg-background mixin
// --------------------
//
// This mixin is used for delivering datauri svgs to to your scss.
//
//
// Usage:
// .element {
//     @include svg-background(name-of-your-file);
// }

@function get-svg-bg-icon($name) {
    @if not map-has-key($svg-icon-map, $name) {
        @error "No svg icon found for name #{$name} in $svg-icon-map.";
    }

    @return map-get($svg-icon-map, $name);
}

@mixin svg-background($name) {
    background-image: get-svg-bg-icon($name);
    background-repeat: no-repeat;
}
