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.4.27 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.4 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.26 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.3 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.25 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.2 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.24 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.1 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.23 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.22 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.0 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.21 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.5.0.beta.1 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.20 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.19 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.18 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.17 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.16 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.15 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss
workarea-admin-3.4.14 app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss