Sha256: 6e03cee19c380e6429fdd5ce9ffdc00ff6de91083fedc1b1857a5694cb34fd68

Contents?: true

Size: 1001 Bytes

Versions: 62

Compression:

Stored size: 1001 Bytes

Contents

/*------------------------------------*\
    #TEXT-BOX-IMAGE
\*------------------------------------*/

/// Adds an image to an edge of a text box.
///
/// @param {Path} $image - the partial path of the image, relative to
///     image directory and engine path's root
/// @param {String} $side [left] - used for positioning the image. `left` or
///     `right`
/// @param {Dimension} $size [$spacing-unit * 2] - the height/width of the image
/// @param {Dimension} $spacing - the even spacing around the image
///
/// @example scss - Text box Image mixin
///     .text-box--valid {
///         @include text-box-image('icons/valid.svg', right);
///     }
@mixin text-box-image($image, $side: left, $size: ($spacing-unit * 2), $spacing: $spacing-unit) {
    padding-#{$side}: $size + ($spacing * 2);
    background-size:     $size;
    background-repeat:   no-repeat;
    background-image:    image-url("workarea/admin/#{$image}");
    background-position: $side $spacing top round($spacing * 1.25);
}

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.5.15 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.36 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.14 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.35 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.13 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.34 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.12 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.33 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.11 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.10 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.32 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.9 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.31 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.8 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.30 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.7 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.29 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.6 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.28 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.5 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss