Sha256: 85359a1df63da1f2f3b485a66d59f5a6037b4eb9f43e2afe819cdffc1b95b3da

Contents?: true

Size: 989 Bytes

Versions: 62

Compression:

Stored size: 989 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/storefront/#{$image}");
    background-size: $width $height;
    overflow: hidden;
}

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-storefront-3.4.27 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.5.4 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.26 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.5.3 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.25 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.5.2 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.24 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.5.1 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.23 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.22 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.5.0 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.21 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.5.0.beta.1 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.20 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.19 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.18 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.17 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.16 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.15 app/assets/stylesheets/workarea/storefront/tools/_svg.scss
workarea-storefront-3.4.14 app/assets/stylesheets/workarea/storefront/tools/_svg.scss