_bootstrap-mincer.scss (776B)
1 // Mincer asset helper functions 2 // 3 // This must be imported into a .css.ejs.scss file. 4 // Then, <% %>-interpolations will be parsed as strings by Sass, and evaluated by EJS after Sass compilation. 5 6 7 @function twbs-font-path($path) { 8 // do something like following 9 // from "path/to/font.ext#suffix" to "<%- asset_path(path/to/font.ext)) + #suffix %>" 10 // from "path/to/font.ext?#suffix" to "<%- asset_path(path/to/font.ext)) + ?#suffix %>" 11 // or from "path/to/font.ext" just "<%- asset_path(path/to/font.ext)) %>" 12 @return "<%- asset_path("#{$path}".replace(/[#?].*$/, '')) + "#{$path}".replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>"; 13 } 14 15 @function twbs-image-path($file) { 16 @return "<%- asset_path("#{$file}") %>"; 17 } 18 19 $bootstrap-sass-asset-helper: true;