docbrown/app/assets/stylesheets/_functions.scss
2020-07-28 09:45:13 -04:00

15 lines
417 B
SCSS

/**
*
* Generates an image path. The mixin is required
* so that webpack for Storybook and the application can both
* generate the image path correctly.
*
* $image: the image file name, e.g. 'loading-ellipsis.svg'
*/
@function image-src($image) {
@if variable-exists(environment) and $environment == 'storybook' {
@return '../images/' + $image;
} @else {
@return image_path('loading-ellipsis.svg');
}
}