This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
2015-09-15 14:59:29 +00:00
|
|
|
// Mincer asset helper functions
|
|
|
|
//
|
|
|
|
// This must be imported into a .css.ejs.scss file.
|
|
|
|
// Then, <% %>-interpolations will be parsed as strings by Sass, and evaluated by EJS after Sass compilation.
|
|
|
|
|
|
|
|
|
|
|
|
@function twbs-font-path($path) {
|
|
|
|
// do something like following
|
|
|
|
// from "path/to/font.ext#suffix" to "<%- asset_path(path/to/font.ext)) + #suffix %>"
|
|
|
|
// from "path/to/font.ext?#suffix" to "<%- asset_path(path/to/font.ext)) + ?#suffix %>"
|
|
|
|
// or from "path/to/font.ext" just "<%- asset_path(path/to/font.ext)) %>"
|
2016-03-20 08:49:32 +00:00
|
|
|
@return "<%- asset_path('#{$path}'.replace(/[#?].*$/, '')) + '#{$path}'.replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>";
|
2015-09-15 14:59:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@function twbs-image-path($file) {
|
2016-03-20 08:49:32 +00:00
|
|
|
@return "<%- asset_path('#{$file}') %>";
|
2015-09-15 14:59:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$bootstrap-sass-asset-helper: true;
|