// File URL Helpers - Used for loading in images $file-url-helper-path: false !default; $file-url-path: "/images/" !default; // Font URL Helpers $font-url-helper-path: false !default; $font-url-path: "/fonts/" !default; // A function which can either output a image-url to be used with the Rails // Asset Pipeline or Compass or a plain url which is prefixed with a defined // path variable. @function file-url($file) { $url: ''; @if $file-url-helper-path { $url: url($file-url-path + $file); } @else { $url: asset-url($file); } @return $url; } @function font-url-helper($file) { $url: ''; @if $font-url-helper-path { $url: font-url($file); } @else { $url: url($font-url-path + $file); } @return $url; }