////// DO-ICON MIXIN USAGE ///// ///// -> do-icon($background-color, $edge-color, $text, $text-color, $icon, $shape-color); ///// +> @include do-icon(#009688, lighten(#009688, 20%), "", ""); /// // $background-color: the background of the document image (A color is expected - REQUIRED) // $edge-color: the color of corner edge // $text: the type of mime type // $text-color: the color of the text containing file extension (A color is expected) // $icon: inject an icon inside the document model // IF WOU WANT CHANGE THE DEFAULT ICON // #{$background-color} -> the icon main color // #{$edge-color} -> the icon secondary color // #{$font-size} -> the size of the file extension text (exe, jpg, gif, etc) // #{$icon} -> the ascii code of the icon font // #{$text} -> the file extension variable @mixin do-icon( $background-color: #888, $edge-color: null, $text: null, $text-color: #f1f2f2, $icon: null ) { @if (type-of($edge-color) != 'color') { $edge-color: lighten($background-color, 15%); } @if (type-of($text-color) != 'color') { $text-color: '#F1F2F2'; } @if (type-of($text) != 'string') and ($text) { $text: '@#!'; } $background-color: colorEncode($background-color); $text-color: colorEncode($text-color); $edge-color: colorEncode($edge-color); $ico: '#{$icon} #{$text}'; background-image: url('data:image/svg+xml;utf8,#{$ico}'); }