Sha256: 1ba27d94c9d5441f3fd14c12b455e17a0f911cad3fa9322b2ade296ea949f6f7
Contents?: true
Size: 984 Bytes
Versions: 62
Compression:
Stored size: 984 Bytes
Contents
/*------------------------------------*\ #SVG \*------------------------------------*/ /// Adds supportive styles for incluing an SVG via CSS. /// /// @param {Path} $image - the partial path of the image, relative to /// image directory and engine path's root /// @param {Dimension} $width - the width of the UI /// @param {Dimension} $height [nil] - the height of the UI, if `nil` `$height` /// will default to `$width` /// @param {Color} $bg-color [$tranparent]- the background color of the UI /// /// @example scss - SVG mixin /// .block { /// @include svg(image.svg, 24px); /// } @mixin svg($image, $width, $height: nil, $bg-color: $transparent) { @if ($height == nil) { $height: $width; } display: block; text-indent: 200%; width: $width; height: $height; background: $bg-color; white-space: nowrap; background-image: image-url("workarea/admin/#{$image}"); background-size: $width $height; overflow: hidden; }
Version data entries
62 entries across 62 versions & 1 rubygems